Forum Moderators: not2easy

Message Too Old, No Replies

background image bullet only shows up on first list item in IE7

         

crazycourier

11:40 pm on Sep 18, 2007 (gmt 0)

10+ Year Member


Maybe someone can help me with this, i'm at wits end. I've styled my list to have a background image to replace the bullet. So it works in everything (even ie6), but in ie7 only the first bullet shows and the rest of the list items don't. Any help would be greatly appreciated.

HTML:

<ul class="videolist">
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
<li><a href="#">item</a></li>
</ul>

CSS:
.videolist li {
list-style: none;
line-height: 1.5em;
background: url(img/video.gif) no-repeat top left;
padding-left: 25px;
font-size: .9em;
}

Geoffrey james

11:53 pm on Sep 18, 2007 (gmt 0)

10+ Year Member



Hi,

Try this,

Change list-style:none; to list-style-type:none;

do

background-position:0;
margin:7px 0 7px 0; (these numbers can be changed for your specific req)

cheers Geoffb

Marshall

12:00 am on Sep 19, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Depending on what your background is, meaning an entire background or just something to mimic a bullet, you can use:

ul {
list-style-image: url(bullet.gif);
}

Marshall

crazycourier

2:41 pm on Sep 19, 2007 (gmt 0)

10+ Year Member



Hey Guys,
Thanks for both your replies!
Geoffrey, I tried your solution but it didn't seem to work.

Marshall, yours did work. I did just have a bullet image that I wanted to replace and not an entire background. My reasoning for going with the background image was so I could control the vertical alignment of the bullet image. But this works just fine and much appreciation for both of your help!

~Scott

Robin_reala

12:20 pm on Sep 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For future reference, using list-style instead of list-style-type is perfectly valid shorthand. However I don't think IE5(.5?) understands if. If you've dropped IE5 support then go right ahead.