Styling the mobile drop down links (v. 2.84 - 2.9)
In mobile view, when a visitor clicks 'Pages', the links in the page list that drops down are not vertically centered. In addition, a small gap appears on the right side of the page. You can fix this one of two ways:
Method 1: Change the core style sheet.
This method will change the style for all templates on the site. No template changes need to be made.
-
Open the style.php file in the main folder.
-
Change the following code (around line 2771 or 2932, depending on the version):
.sb_hpages nav.sb_hlinks ul li { display: block; margin: 0; line-height: 2.5em; height: 2.5em; background-color: $CatButtonBkgd; border: 1px solid $CatButtonBorder; text-align: center; color: $CatButtonText; } .sb_hpages nav.sb_hlinks ul li a { display: block; width: 100%; height: 100%; padding: 10px; color: $CatButtonText; }to:
.sb_hpages nav.sb_hlinks ul li { display: block; margin: 0; background-color: $CatButtonBkgd; border: 1px solid $CatButtonBorder; text-align: center; color: $CatButtonText; } .sb_hpages nav.sb_hlinks ul li a { display: block; width: 100%; vertical-align: middle; padding: 5px 0; color: $CatButtonText; }
Method 2: Change the template
This method will only change the template. It's a good choice for template designers who aren't able to change the core PHP files.
Add the following to your internal template files, or to your custom style sheet. Make sure these are loaded after the core style.php file is loaded:
.sb_hpages nav.sb_hlinks ul li { line-height: auto; height: auto; }
.sb_hpages nav.sb_hlinks ul li a { height: auto; vertical-align: middle; padding: 5px 0; }