html - float right and float left in absolute container - IE7 Expands to 100% width -



html - float right and float left in absolute container - IE7 Expands to 100% width -

i trying float left , float right in absolute container..it works fine in chrome,ff expected behaviour of chrome..to have width of children not entire width.

html

<div class='container'> <div class='floatleft'>float left </div> <div class='floatright'>float right </div> </div>

css

.container{ background-color: orange; position:absolute; } .floatleft{ float:left; background-color: green; } .floatright{ float:right; background-color: yellow; }

in ie , chrome

that's due ie7 having been crappy browser when comes implementation of visual formatting model specified w3c. whereas absolutely positioned block elements should shrink-wrap fit contents, ie7 allow them stretch maximum available width, canvas width, if contained pair of l- en r-floated elements.

i suggest not code ie7 anymore. owners have actively stop windows update updating 8. @ every update, day. , if concerned higher ie versions in compatibility mode/view, there easy ways forcefulness them natural, own mode when used visit site.

also, used anymore. heard has left building yesterday. :-)

html css css-float

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -