开发者

floating larger image outside of div

Got a problem, some of you might be able to help me with. Unlike most of the entries i've found on the subject, i am looking for a solution where i can float a larger image inside a div outside of the div.

It works in every browser except IE7, see the link, it's a bit hard to 开发者_如何学运维explain but you can see that ie7 centers the image insted of floating it right.

I need it because i have a 2 col layout where the right col needs to have an image there potentially could be underneath the left col.

position:absolute is not an option..

Hope somebody can help.

http://jsfiddle.net/J3NV6/2/


You could float the image relative to a wrapper or container, with something like

#wrap img.YourImage {
    position: relative;
    top:0;
    bottom:0;
    left:0;
    right:100px;
}


Just add this just before closing the div

<div style="clear:both; height:0px; font-size:0px;">&nbsp;</div>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜