CSS ul li image to align with text

后端 未结 4 1074
情深已故
情深已故 2021-02-19 18:26

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: 5         


        
相关标签:
4条回答
  • 2021-02-19 19:10

    Thank you both of you. The problem is that I already use background for a line-separator. But I'll change it to border then I'll use background for the bullet image.

    0 讨论(0)
  • 2021-02-19 19:19

    I see you're removing left padding for list items. For IE, you need to do the same with the left margin - either completely remove it (set to zero) or make it something smaller than the default. Then your list items will align nicely.

    0 讨论(0)
  • 2021-02-19 19:20

    use line-height :)

    0 讨论(0)
  • 2021-02-19 19:22

    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.

    0 讨论(0)
提交回复
热议问题