Hi, I am trying to create a very simple "no-frills" tab using html & css. For this, I have a bunch of li elements and inside each of these, there is a "a href" element. Now, when i look at the output in IE & Firefox (after setting the styles to make the list display horizontally with proper border and everything), I can see that the "a" element overflows the "li" element. How do i make the "li" element resize based on the "a" element?
Edit: Adding the code.
html
<div id="tabs"> <ul> <li><a href="#fragment-1"><span>One</span></a></li> <li><a href="#fragment-2"><span>Two</span></a></li> <li><a href="#fragment-3"><span>Three</span></a></li> </ul> </div>
here are the styles i am using
#tabs ul { list-style:none; padding: 0; margin: 0; } #tabs li { display: inline; border: solid; border-width: 1px 1px 1px 1px; margin: 0 0.5em 0 0; background-color: #3C7FAF; } #tabs li a { padding: 0 1em; text-decoration: none; color:White; font-family: Calibri; font-size: 18pt; height: 40px; }