• It’s my first time migrating a html website to wordpress. The only issue I can’t resolve so far is the padding right of the mobile menu items (have to open the web-site from a mobile device, Google Chrome’s dev console version looks fine). For some reason WordPress menu makes the menu items slightly for off-center. The same was with the full version which I resolved by adding the following to style.css:

    
    ul.menu {
      display: block;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0px;
      margin-inline-end: 0px;
      padding-inline-start: 0px;
    }
    

    One of my guesses would be that something conflicts with iOS version of Safari, but I’m not sure what that could be.
    I would really appreciate some advice, it seems like I’ve tried everything.

    • This topic was modified 7 years, 3 months ago by itsmsmith.
    • This topic was modified 7 years, 3 months ago by itsmsmith.
    • This topic was modified 7 years, 3 months ago by Jose Castaneda. Reason: added backticks for code formatting

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • The styling is determined by the theme, not WordPress, so you should ask at the theme’s support forum.

    Thread Starter itsmsmith

    (@itsmsmith)

    Before migrating to WordPress the styling was fine. I just remembered that I’d come across this issue before and it seems like WordPress adds a space before each menu item, but I’m not sure how to avoid it.

    • This reply was modified 7 years, 3 months ago by itsmsmith.

    It’s still dependent on the theme (which could have a nav walker determining the output), and how the menu is styled. And since you are using display: block, the space should not matter. But not all browsers support the properties you are using either.
    https://www.caniuse.com/#search=block-start

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Menu Items Padding’ is closed to new replies.