Skip to content

Change the menu items from uppercase to capitalize in Hestia ​

Hestia's menu items are uppercase by default, but a short CSS snippet in the Customizer lets you change the text-transform property for each of Hestia's three menu areas: the Primary Menu, Footer Menu, and Very Top Bar Menu.

In this article

What text-transform does ​

text-transform is a CSS property that converts text as follows:

  • lowercase makes all of the letters in the selected text lowercase.
  • uppercase makes all of the letters in the selected text uppercase.
  • capitalize capitalizes the first letter of each word in the selected text.
  • none leaves the text's case and capitalization exactly as it was entered.

Primary Menu ​

By default, Hestia's menu items are set to uppercase:

Primary menu items in uppercase

To change this, add a short CSS snippet to Appearance -> Customize -> Additional CSS:

css
.navbar .navbar-nav>li>a {
   text-transform: capitalize;
}

This code capitalizes the first letter of each menu item and sets the rest to lowercase:

Primary menu items capitalized

You can also replace capitalize in the code above with any other value you prefer. For example, to make all the items lowercase, use:

css
.navbar .navbar-nav>li>a {
   text-transform: lowercase;
}

The process and the properties are the same as for the Primary Menu. The only difference is that the CSS code targets the footer menu area. The code for changing the footer menu items is:

css
.footer .footer-menu > li > a {
    text-transform: capitalize;
}

The result:

Footer menu items capitalized

Very Top Bar Menu ​

The process for the Very Top Bar menu is the same as for the Primary Menu and Footer Menu. The only difference is that the code targets the Very Top Bar Menu text:

css
.hestia-top-bar ul li a {
   text-transform: capitalize;
}

The result:

Very Top Bar menu items capitalized

You can preview these changes in Appearance -> Customize and, if everything looks fine, click Publish.

Was this helpful?