[Your text to link here…](http://chefpepe.com/newsletters/eblast-list.html “Newsletter List”)
What’s the most ‘pro joe’ way to center this ul horizontally and vertically on the page?
I was hoping to avoid any widths so it’s dynamic according to whatever is the longest sentence.
Well, given the size of your list, I don’t think vertical centering should matter. Now, regarding horizontal centering, you won’t do much without a given width; could it be 50%, 500px or whatever pleases you.
Try this on the #nav element:
margin: 0 auto;
And remove both z-index and height.
Nice, also, if you inspect css lines 45 to 55. What would I use those spans for? I got the code from somewhere and I just want to understand better.
> Nice, also, if you inspect css lines 45 to 55. What would I use those spans for? I got the code from somewhere and I just want to understand better.
Looks like you don’t use span at all, you can safely remove those lines.
Yeah, but he’s talking about an horizontal list, not a vertical one. :)
You can use display as well with CSS2.1 or 3 (+ vendor-prefix).
As you can see , no need to size the centered container.
If you want to include IE7 and below, then you need one extra tag and use display:inline;+zoom:1 .
… the list can be horizontal or vertical, and both horizontal/vertiacal centered.
Yeah horizontal is all I need, but for my education, can you show me an example using my divs? I’m not sure what to get rid of and/or replace.
This answer was perfect : http://css-tricks.com/forums/discussion/comment/105203/#Comment_105203 , you have nothing to remove or replace from your HTML.
Idem for your CSS.
There is no ‘magic’ to add :)
You must be logged in to reply to this topic.