Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS ul li image to align with text

Tags:

css

I have a CSS like this

ul {
    list-style-image:url(images/bulletArrow.gif);
}

ul li {
    background: url(images/hr.gif) no-repeat left bottom;
    padding: 5px 0 7px 0;
}

But the bullet image doesn't align properly in IE (it's fine in Firefox). I already have a background image for li, so I can't use the bullet image as a background. Is there any solution to this?

Thanks in advance.

like image 592
Aximili Avatar asked Nov 10 '08 00:11

Aximili


2 Answers

There is a good explanation and solution of this here: http://css.maxdesign.com.au/listutorial/master.htm

It says that using list-style-image results in inconsistent placement of the image with different browsers. Then it explains how to use background images for the bullets for a better result.

like image 109
Paige Ruten Avatar answered Sep 20 '22 15:09

Paige Ruten


use line-height :)

like image 21
Stavros Avatar answered Sep 17 '22 15:09

Stavros