Forum Moderators: open
I am trying to run a list:hover sequence, and I have the class and everything in my CSS but I can't seem to make the list not have a line break in between each new <li> .
Here's the code...
(CSS)
li.tab { background-image: url('http://www.example.com/imgs/layout/nav/nohovertab.png'); width: 91px; height: 38px; list-style-type: none; }
li.tab:hover { background-image: url('http://www.example.com/imgs/layout/nav/hovertab.png'); width: 91px; height: 38px; list-style-type: none; }
(HTML)
<div class="navbg">
<img class="logo" src="http://www.example.com/imgs/logos/d-padlogo.png" align="left"><br><br>
<ul>
<li class="tab">&nbps;</li>
<li class="tab"> </li>
</ul>
</div>
So, yeah...please help me out on this one.
[edited by: tedster at 4:36 am (utc) on Feb. 28, 2009]
[edit reason] switch to example.com [/edit]
this might work:
ul.tab{
list-style-type: none;
background-image: url('http://www.example.com/imgs/layout/nav/nohovertab.png');
width: 91px;
height: 38px;
}
ul.tab:hover{
background-image: url('http://www.example.com/imgs/layout/nav/hovertab.png');
}
ul.tab li{
display: inline;
}
sometimes i find it helpful to use The W3C CSS Validation Service [jigsaw.w3.org].
(not that i'm saying anything about you or your code, i'm just saying...)
=8)
note there is some trickery needed to get ti to work in all browsers:
[webmasterworld.com...]
In the end though, I just took out the background div then made the <li class> float to the left. It isn't exactly what I wanted in the beginning but it worked out better than I really thought it would.
And, phranque, thanks so much! You really helped me out, that code is really useful, I will definitely need that in some of my other codes!