OK, here's the thing. I have this horizontal nav I need to create. I'm trying to do it semanticaly with as little extra markup as possible. Here's what I have so far:
#topNav a { font-size: 1.2em; font-weight: bold; height: 100%; color: #006699; text-decoration: none; padding: 0px; } --> </style> </head> <body> <ul id="topNav"> <li><a href="#">Link 1</a></li> <li><a href="#">Link 2</a></li> <li><a href="#">Link 3 Link 3</a></li> <li><a href="#">Link 4 Link 4 Link 4</a></li> <li><a href="#">Link 5 Link 5 Link 5</a></li> <li class="last"><a href="#">Link 6 Link 6 Link 6</a></li> <br style="clear: both;"> </ul> </body> </html>
Now here's the tricky part: If you look in your browser, you'll see that each "tab" is bordered by white lines. When the text in the tabs begins to wrap due to screen resolution the white borders stretch for the tabs in which the wrapping takes place.
I need the stretching to happen for all of the tabs not tjust the ones with wrapping text, and I also need the text to stay vertically centered. Anyone got any ideas?
Nick, Unfortunately, the info on that page didn't help. Perhaps I should better explain the problem. I have a page with a centered horizontal nav. Each tab in the nav should be the same size. This works fine when the text within the tabs all stays on one line.
The problem arises when the screen resolution changes so that some of the text within the tabs needs to wrap. The tabs where the text wraps expand in height, as they should, but the tabs where the text does not wrap do not change in height.
I need to find a way so that all of the tabs are the same height regardles of whether the text wraps in some of the tabs or not.
this is an interesting issue. I've had simmilar questions before but unfortunately i didn't find a flexible CSS way to solve them. It would be easy to do this in a table based enviornment, but I'm sure you're not going on that track.
A possible (grandma' ) sollution, if you know the exact number of buttons that go into your topnav would be to designate an image as a background for your ul that would mimic borders (precisely tailored to your buttons).
However using that method you can kiss flexibilty and fluid design goodbye as it does not scale horizontaly and it would look terrible in case of an incomplete (per line) multi row menu.
I'm tracking this discussion. Maybe someone can figure this one out.