This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > November 2006 > auto width is not computed correctly in explorer strict mode





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author auto width is not computed correctly in explorer strict mode
bordsby

2006-11-19, 7:36 pm

according to the w3c :
http://www.w3.org/TR/CSS21/visudet....-replaced-width

The rules for calculating width for absolutely positioned non-replaced
elements say that when 'left' and 'right' are not 'auto' and 'width' is
'auto'.... then..... solve for width

---------------------------------------------------------------------------------------------
'width' is 'auto', 'left' and 'right' are not 'auto', then solve for
'width'
---------------------------------------------------------------------------------------------

using....

---------------------------------------------------------------------------------------------
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width'
+ 'padding-right' + 'border-right-width' + 'margin-right' + 'right' +
scrollbar width (if any) = width of containing block
---------------------------------------------------------------------------------------------

so if i set 'left' and 'right' both to '0px' (and have no
border,padding,margin,or scrollbar) then the absolutely positioned
element width should be equal to the width of the containing block

this works in firefox of course. it does not work in explorer, even
with strict mode

am i missing something here? i thought strict mode was supposed to
make explorer follow the w3c visual formatting details... this seems to
be a pretty major mistake

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews