H
Hardeep Rakhra
Heya,
I've just knocked together a menu using the example at
http://css.maxdesign.com.au/floatutorial/tutorial0613.htm
But rather than leave the extra space to the right when your menu
elements do fill it up, I've used additional padding to the left and
right of the links to squeeze the bank space out. But this involves
setting the padding in very precise abouts like 2.77em, which seems crap
way of doing it. Is there any way you can cause each link element to
use up as much space as it possibly can thus creating something like
what i already have.... see here...
http://www.rakhra.org.uk/menusample.png
Thanks in advance for any advice.
Hardeep.
------ css ------
..inlinelist {
list-style-type: none;
padding: 0em;
margin: 0.5em 0em;
float: left;
width: auto;
border: 0.063em solid #ccc;
border-right: none;
}
..inlinelist li {
display: inline;
}
..inlinelist li a {
float: left;
width: auto;
padding: 0.425em 2.75em; /*0.3 */
color: #191970;
background-color: #fff;
text-decoration: none;
border-right: 0.063em solid #ccc;
font-weight: bold;
}
..inlinelist li a:hover
{
padding: 0.3em 2.77em;
font-weight: bold;
background-color: #f2f2f2;
border-bottom: 0.125em solid #ccc;
}
----- html ----
<ul class="inlinelist">
<li>
<a href="#">Home</a>
</li>
<li>
<a href="#">Products</a>
</li>
<li>
<a href="#">Ask An Expert</a>
</li>
<li>
<a href="#">Gift Ideas</a>
</li>
<li>
<a href="#">How To Buy</a>
</li>
<li>
<a href="#" class="lastmenuitem">Join</a>
</li>
</ul>
I've just knocked together a menu using the example at
http://css.maxdesign.com.au/floatutorial/tutorial0613.htm
But rather than leave the extra space to the right when your menu
elements do fill it up, I've used additional padding to the left and
right of the links to squeeze the bank space out. But this involves
setting the padding in very precise abouts like 2.77em, which seems crap
way of doing it. Is there any way you can cause each link element to
use up as much space as it possibly can thus creating something like
what i already have.... see here...
http://www.rakhra.org.uk/menusample.png
Thanks in advance for any advice.
Hardeep.
------ css ------
..inlinelist {
list-style-type: none;
padding: 0em;
margin: 0.5em 0em;
float: left;
width: auto;
border: 0.063em solid #ccc;
border-right: none;
}
..inlinelist li {
display: inline;
}
..inlinelist li a {
float: left;
width: auto;
padding: 0.425em 2.75em; /*0.3 */
color: #191970;
background-color: #fff;
text-decoration: none;
border-right: 0.063em solid #ccc;
font-weight: bold;
}
..inlinelist li a:hover
{
padding: 0.3em 2.77em;
font-weight: bold;
background-color: #f2f2f2;
border-bottom: 0.125em solid #ccc;
}
----- html ----
<ul class="inlinelist">
<li>
<a href="#">Home</a>
</li>
<li>
<a href="#">Products</a>
</li>
<li>
<a href="#">Ask An Expert</a>
</li>
<li>
<a href="#">Gift Ideas</a>
</li>
<li>
<a href="#">How To Buy</a>
</li>
<li>
<a href="#" class="lastmenuitem">Join</a>
</li>
</ul>