Forum Moderators: not2easy
<ul>
<li class="activetab"><a title="Friends" onclick="do_info('friends'); return false;">Friends</a></li>
<li><a title="Events" onclick="do_info('events'); return false;">Events</a></li>
<li><a title="Music" onclick="do_info('music'); return false;">Music</a></li>
<li><a title="RSVP's" onclick="do_info('RSVP'); return false;">RSVP's</a></li>
<li><a title="Bulletin" onclick="do_info('bulletin'); return false;">Bulletin</a></li>
<li><a title="Mail" onclick="do_info('mail'); return false;">Mail</a></li>
<!--end tabs-->
</ul>
To just rephrase: I want to move the text in these tabs down, but when I do it gives me whitespace below the elements. I can't have this extra whitespace.
could you give us the css code as well for us to help you
li {
background: #FFFFFF url(images/tab_grey.gif) top left no-repeat;
display: inline;
width: 82px;
height: 22px;
padding: 0 0 0 0;
margin: 0 0 0 0;
cursor: default;
z-index: 2;
}
li a {
background: #FFFFFF url(images/tab_grey.gif) top left no-repeat;
float: left;
width: 81px;
height: 22px;
text-align: center;
color: #959595;
font-family: Arial;
font-size: 12px;
font-weight: bold;
text-decoration: none;
padding: 0 0 0 0;
margin: 0 0 0 0;
cursor: default;
}
li :visited {
background: #FFFFFF url(images/tab_grey.gif) top left no-repeat;
width: 81px;
height: 22px;
text-align: center;
color: #959595;
font-family: Arial;
font-size: 12px;
font-weight: bold;
text-decoration: none;
text-align: center;
padding: 0 0 0 0;
margin: 0 0 0 0;
}
li :hover {
background: #FFFFFF url(images/tab.gif) top left no-repeat;
height: 22px;
width: 81px;
color: black;
font-family: Arial;
font-size: 12px;
font-weight: bold;
text-decoration: none;
text-align: center;
padding: 0 0 0 0;
margin: 0 0 0 0;
}
li :active {
background: #FFFFFF url(images/tab.gif) top left no-repeat;
height: 22px;
width: 81px;
color: black;
font-family: Arial;
font-size: 12px;
font-weight: bold;
text-decoration: none;
text-align: center;
padding: 0 0 0 0;
margin: 0 0 0 0;
}
As for me, I cheat a bit when that happens. Someone else might have a better solution, but I do one of two things:
if you pad the top 5 pixels and you get 5px of whitespace below it, set your margin-bottom:-5px. If you prefer not to use negative margins (truly, I prefer not to, but sometimes you have to!) then set the height of your anchor tag so that the whitespace doens't occur - like as 1em, or 1.5 em - whatever works :)
Like I said, someone else might have better ideas, but one of those usually works for me :)