How do I space out my menu text in CSS?

Hi,

I have a website http://www.yourdollarhost.com how do I space out my menu text? (Home, Affiliates, Contact, Support, and Order Now)

Thanks!

Have you tried increasing the padding on the links? Or adding margins to the LIs? Plenty of options there. :slight_smile:

Making the list display:table-cell (and a parent display:table) will evenly space out the menu items and give you a lot of room.

I think it looks good as is though.

whats the CSS code to make the menu items spaced out more?

Thanks!

^^

whats code in the CSS that I can increase the padding? I don’t want the height to be increased just the width.

Thanks!

Then only specify the horizontal padding. Padding left and right.

Adjust this to taste:

  .ddsmoothmenu ul li a {
    padding: 7px 40px 10px 0;
  }

Your right padding is currently 40px, and left is 0.

That works but how do I get the “Home” menu text to move over to the right with it?

Thanks!

Lots of ways, but perhaps easiest is to increase the left padding on the container (currently 39px):

#content-over2 {
  padding: 0px 0px 0px 39px;
}

That worked! Thank you!

Great! I edited my post to read “left padding”. Sorry about that. (I’ve always had a problem with left/right. Grrr …)

Good point!

I’m increasingly using table-cell as opposed to floats for my navs. This approach has loads of advantages other than avoiding floats: The greatest one being the ability to change the nav height without having to calculate the padding required to vertically align your links.

Bingo.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.