biwek86619
ParticipantForum Replies Created
-
In reply to: How to Center Align or Pad Text in Hamburger Dropdown Menu
June 29, 2023 at 8:17 pm #51905You can use the following CSS code to center align or add padding to the text for menu options on the main menu hamburger dropdown:
.main-menu .hamburger-menu ul li a {
/* Center align the text */
text-align: center;/* Add padding to the left and right of the text */
padding: 0 10px;
}If you want to add padding to the top and bottom of the text as well, you can use the following code:
.main-menu .hamburger-menu ul li a {
/* Center align the text */
text-align: center;/* Add padding to the left, right, top, and bottom of the text */
padding: 10px;
}Once you have added this code to your theme’s style.css file, you will need to save the file and then clear your cache. After that, the text for menu options on the main menu hamburger dropdown should be centered aligned or have padding, depending on the code you used.
Yes, just make sure to keep the backup.
Viewing 2 posts - 1 through 2 (of 2 total)