开发者

Basics - When setting a div in line, float too?

开发者 https://www.devze.com 2023-02-25 09:49 出处:网络
This may be a quick answer for one: I typically use display: inline-block; to set a list of divs horizontally.But I noticed in IE7 it\'s a no go, the only way around it is using float: left; but I lo

This may be a quick answer for one:

I typically use display: inline-block; to set a list of divs horizontally. But I noticed in IE7 it's a no go, the only way around it is using float: left; but I lose that relativity position, causing everything else afterwards to push upwards as if it were literally floating on top. So how can I a achieve the same display: inline-block;, so it doesn't "float" and works in IE7 and all the moder开发者_JAVA百科n day goodness.

Thanks,


Try the techniques in this article. It may be more than you need for this particular application, but it should work:

http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/

0

精彩评论

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