ie8 playing funny with list-style-position: inside

Posted by LeeR on Stack Overflow See other posts from Stack Overflow or by LeeR
Published on 2010-05-10T01:28:54Z Indexed on 2012/10/02 9:38 UTC
Read the original article Hit count: 152

Filed under:
|

Ok,

So problem here... when using list-style-position:inside in IE8 the first like is indented but every line after that is not. So the new lines appear under the bullet.

This is fine, but when I use a list with that css applied with an a tag within the li then the text automatically gets pushed to the second line, and the first line is empty.

ie8 bug

When I remove the a tag from the li then it jumps back up.

Any idea on why this might be or is this a bug in the ie8 world or do I just need to double check my css?

Any insights would be much appreciated.

As asked here is some code

<div id="sub_nav">
<ul>
...    
<li><a class="active_page" href="#">Liposculpture</a>
<ul>
<li><a href="#">What is Liposculpture?</a></li>
<li><a href="#">About Liposculpture surgery</a></li>
<li><a href="#" class="active_sub">After Liposculpture surgery</a></li>
<li><a href="#">Post Op Instructions</a></li>
<li><a href="#">Liposculpture Side Effects</a></li>
<li><a href="#">Liposuction Introduction to</a></li>
<li><a href="#">Tumescent Liposculpture</a></li>
</ul>
</li>
...
</ul>
</div>

For the CSS I will try and show it best I can

#sub_nav li {
    width: 200px;
    padding:4px 0;
    border-bottom: 1px #CCC solid;
}

#sub_nav li a {
    text-decoration: none;
    color:#555;
    padding:7px 15px 7px 15px;
    display: block;
}

#sub_nav li ul li {
    list-style-position: inside;
    list-style-type: disc;
    font: 11px Arial;
    padding-left:15px;
    color:#FFF;
    border-bottom: none;
}

#sub_nav li ul li a {
    padding:0;
    margin:0;
    text-indent: 0;
}

Hope this helps

© Stack Overflow or respective owner

Related posts about css

Related posts about internet-explorer-8