PPS: the short answer was, you can include the tag A to display a βblockβ, and add any add-on, and this add-on will capture clicks. A floating element (float: left, float: right) is an implicit "display: block". The inline element (for example, SPAN) also uses padding to identify the area that receives the background image; but without affecting the layout.
The easiest way to do this would be something like this:
ul.tabs, ul.tabs li { float:left; margin:0; padding:0; list-style:none; } ul.tabs li a { float:left; padding:4px 10px 4px; border:1px solid blue; border-bottom:none; margin-right:4px; } .clear { clear:both; } <ul class="tabs"> <li><a href="#">Lorem</a></li> <li><a href="#">Ipsum</a></li> ...etc... </ul> <div class="clear"></div>
If you use the same width for each tab (depending on the longest text in it), you can even use one background gif image:
ul.tabs li a { background:url(tab-bg.gif) no-repeat 50% 0; text-align:center; width:120px; }
A more advanced, classic way to make tabs that adapt to different font sizes, and can use custom imags for corners and filling - "Sliding doors":
http://www.alistapart.com/articles/slidingdoors/
user58777
source share