I am trying to write a web page that displays horizontal tabs across the top. I have copied the CSS and HTML from several different examples but I always end up with a vertical unordered list of options. I don't have any other CSS concerning unordered lists that would conflict with what I am experimenting with. Here is the CSS:
#ts_tabmenu { font-size: .75em; padding: 20px 0px 0px 20px; } #ts_tabmenu ul { line-height: 1em; margin: 0px; list-style-type: none; float: left; padding: 0px 0px 0px 5px; } #ts_tabmenu ul li { float: left; } #ts_tabmenu ul li a { text-decoration: none; display: block; float: left; padding: 0px 0px 0px 10px; background: url(tabs.gif) no-repeat left top; margin-left: -5px; z-index: 0; position: relative; color: #666666; } #ts_tabmenu ul li a strong { font-weight: normal; /* remove the bold effect */ display: block; background: url(tabs.gif) no-repeat right top; padding: 6px 10px 7px 5px; cursor: pointer; } #ts_tabmenu ul li a:hover { position: relative; z-index: 5; background: url(tabs.gif) no-repeat left bottom; color: #000000; } #ts_tabmenu ul li a:hover strong { background-image: url(tabs.gif) no-repeat; position: relative; z-index: 5; background-position: right bottom; } And here is the HTML:
<div id="ts_tabmenu"> <ul> <li><a href=#Dashboard><strong>Tutorialsphere</strong></a></li> <li><a href=#><strong>Photoshop</strong></a></li> <li><a href=#><strong>Illustrator</strong></a></li> <li><a href=#><strong>Fireworks</strong></a></li> <li><a href=#><strong>Flash</strong></a></li> <li><a href=#><strong>CSS</strong></a></li> <li><a href=#><strong>PHP</strong></a></li> </ul> </div> Any advice is greatly appreciated.
Regards.
li { outline: 1px dotted red; }to see the space occupied by list items.