![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
hi guy, pls help to test the following page... |
|
the yellow color in the #main can't extend to full 100% width... |
|
this problem only exist in IE7, but okay with 1. IE6 2. Firefox 1.5 3. Opera 9 any idea for this? maybe a new bug from IE? |
#2
| |||
| |||
|
|
howa wrote: hi guy, pls help to test the following page... [snip code] the yellow color in the #main can't extend to full 100% width... Because you didn't give #main 100% width. this problem only exist in IE7, but okay with 1. IE6 2. Firefox 1.5 3. Opera 9 any idea for this? maybe a new bug from IE? IE7 is shrink-wrapping the float (just like other browsers btw), but not extending the width because of a child that wants 100% width. If you take out the 100% width of the #main_a div, the other browsers will do the same as IE7. I'm sure some W3C-specs-guru will know which behaviour is technically correct, but personally I'm not worried about this discrepancy between IE7 and the other browsers. Just set 100% width on #main if that's what you want, don't rely on the children to set the width of the parent. -- Els http://locusmeus.com/ accessible web design: http://locusoptimus.com/ |
#3
| |||
| |||
|
|
why FF, Opera & IE6 is full extending the width? |
|
is that mean IE7 is the only correct browser in doing this (or others are wrong)? |
#4
| |||
| |||
|
|
On 2006-11-03, howa <howachen (AT) gmail (DOT) com> wrote: [snip] why FF, Opera & IE6 is full extending the width? Because 100% means "100% of the width of the containing block". The containing block of #main_a is #main, and #main is an auto-width normal-flow block box |
|
No, IE7 is the only incorrect browser out of the three! Sounds like this is actually a regression between IE6 and IE7. |
#5
| |||
| |||
|
|
Ben C wrote: On 2006-11-03, howa <howachen (AT) gmail (DOT) com> wrote: [snip] why FF, Opera & IE6 is full extending the width? Because 100% means "100% of the width of the containing block". The containing block of #main_a is #main, and #main is an auto-width normal-flow block box Nope, it is floated, which means it would shrink-wrap in both Opera, FF, IE6 and IE7 if it weren't for the content inside it being too wide. |
|
No, IE7 is the only incorrect browser out of the three! Sounds like this is actually a regression between IE6 and IE7. |
|
Where do the specs say that a floated shrink-wrapping box should expand to 100% of its parent when it has a child that has a set width of 100% but no content to fill up that width? (it is possible this is written in the specs, but I haven't seen it afair) |
![]() |
| Thread Tools | |
| Display Modes | |
| |