开发者

IE7 li with image and text issue - Text . Almost working

开发者 https://www.devze.com 2022-12-30 22:00 出处:网络
I\'m using an unordered list. With an image to the left and text to the right. I only noticed today that IE7 was displaying this so badly that it wasn\'t even acceptable. Woops for not realising soo

I'm using an unordered list.

With an image to the left and text to the right.

I only noticed today that IE7 was displaying this so badly that it wasn't even acceptable. Woops for not realising sooner.

I have the given the image a class and the text wrapped in a seperate div.

<ul>
<li><a href="domain"><img src="http://www.domain.com/img.jpg" alt="img class="footer-thumb" width="40px" height="40px" /></a>
    <div class="recent-post-content">
    <p>day date time</p>
    <p><a title="Content title" href="http://www.domain.com/contentitle &raquo;</a></p>
    </div></li></ul>

What's happeninig so far is that it is perfect in every browser except in IE7 where the images are exactly where they should be but the class "recent-post-content" is all pushed up one exactly one image ([li] height) above so the last image doesn't have any text beside it and the first image ([li]) has i开发者_JAVA技巧ts "recent-post-content" above it.

I guess it's something simple but after getting this far on my own I thought it best to try and get some advice to fix the last little bit.

Any ideas?

Thanks


Fix

<img src="http://www.domain.com/img.jpg" alt="img class="footer-thumb" width="40px" height="40px" />

to

<img src="http://www.domain.com/img.jpg" alt="img" class="footer-thumb" width="40px" height="40px" />

and fix

<a title="Content title" href="http://www.domain.com/contentitle &raquo;</a>

to

<a title="Content title" href="http://www.domain.com/contentitle">&raquo;</a>

and IE will behave.

0

精彩评论

暂无评论...
验证码 换一张
取 消