Css tabs and Floats

  • Thread starter Thread starter THT
  • Start date Start date

THT

THT

Associate
Joined
10 Mar 2004
Posts
998
Im trying to do some css stuff with tabs and having a few issues

I want a row of tabs with some text underneath - so i floated them.

but then i have an issue with the text below:

Example

Any ideas?
Ive tried using clear:both at random but with no luck!
 
Use list items for your tabs rather than divs.
Code:
<ul>
  <li><a href="#">Tab1</a></li>
  <li><a href="#">Tab2</a></li>
  <li><a href="#">Tab3</a></li>
  <!-- etc... -->
</ul>

Either float each <li> left, or use display: inline. If you use float, then content after the tabs will have to be cleared with clear: left (e.g. if it's text, make it a paragraph <p>, give it a class and then set clear:left for that class in your css). In both cases you will probably want to change the margin / padding and possibly the list-type to hide any bullets.

http://css.maxdesign.com.au/listamatic/ has some good examples.
 
Back
Top Bottom