Re: [css-d] width:100% + padding/margin question

2008-08-24 Thread Chang Huang
Oh, sorry, I forgot to mention that #box2 is floated, thus it does not occupy the whole width of #box1. Without setting #box2 to width:100%, I believe that its width relies on how long the content is. Correct me if I'm wrong. Thanks On 22/08/2008, at 6:00 PM, Bill Brown wrote: > Chang Hua

Re: [css-d] width:100% + padding/margin question

2008-08-22 Thread Bill Brown
Philippe Wittenbergh wrote: > Bill Brown wrote: > That is not a case of 'margin-collapsing'. :-) > In this case, the bottom-margin of the last-child paragraph is > swallowed by the overflow on the parent box (the one with > overflow:auto and height:100% set). Right...margin-swallowing, not m

Re: [css-d] width:100% + padding/margin question

2008-08-22 Thread Alan Gresley
Bill Brown wrote: > Bobby Jack wrote: >> Bill, can you elaborate on this point? In FF2/Win, I DO see a bottom >> margin on that last element when it scrolls due to "overflow: auto". >> E.g. the yellow background 'shows through' below the last paragraph, >> same size as the other 'borders'. > > Hi

Re: [css-d] width:100% + padding/margin question

2008-08-22 Thread Philippe Wittenbergh
Bill Brown wrote: > I get the bottom margin on some OS/Browser combos as well, but more > often, it collapses. I haven't checked the spec yet, but I suspect > that > this behavior is incorrect because it isn't countered by the normal > collapsing margin fixes (application of padding or border

Re: [css-d] width:100% + padding/margin question

2008-08-22 Thread Bill Brown
Bobby Jack wrote: > Thanks, Bill. That's more-or-less the exact same test I had and, FYI, > the border does NOT collapse on FF2/Win. It's very interesting, isn't it? It's not the behavior I'd expect. My thinking is the same for your other post: I would expect the margins above /and/ below to prop,

Re: [css-d] width:100% + padding/margin question

2008-08-22 Thread Bobby Jack
--- On Fri, 8/22/08, Bill Brown <[EMAIL PROTECTED]> wrote: > Test Page: > http://theholiergrail.com/focus-on-style/bottom-margin-collapse-with-overflow-auto.html Thanks, Bill. That's more-or-less the exact same test I had and, FYI, the border does NOT collapse on FF2/Win. - Bobby _

Re: [css-d] width:100% + padding/margin question

2008-08-22 Thread Bill Brown
Bobby Jack wrote: > Bill, can you elaborate on this point? In FF2/Win, I DO see a bottom > margin on that last element when it scrolls due to "overflow: auto". > E.g. the yellow background 'shows through' below the last paragraph, > same size as the other 'borders'. Hi Bobby, I get the bottom mar

Re: [css-d] width:100% + padding/margin question

2008-08-22 Thread Bobby Jack
--- On Fri, 8/22/08, Bill Brown <[EMAIL PROTECTED]> wrote: > In an overflow situation, collapsing margins will prevent > any bottom > margining (faux padding) to appear on the last element > contained with > #box2. I've never found a decent workaround for this, > but the code above > will give you

Re: [css-d] width:100% + padding/margin question

2008-08-22 Thread Bill Brown
Chang Huang wrote: > > > > > #box1 { width:500px; height:200px; } > #box2 { width:100%; height:100%; padding:10px; } > The 10px padding of #box2 will be allocated outside of #box1. > According to the box model, this is the correct behavior (except for >

Re: [css-d] width:100% + padding/margin question

2008-08-21 Thread Gunlaug Sørtun
Chang Huang wrote: > The 10px padding of #box2 will be allocated outside of #box1. > According to the box model, this is the correct behavior (except for > buggy IE6). But that is not what I want, I want the padding for #box2 > remain inside #box1 and keeping the width in %. > > How can I do th

[css-d] width:100% + padding/margin question

2008-08-21 Thread Chang Huang
Hi, If I have: Code: Select all and I do: Code: Select all #box1 { width:500px; height:200px; } #box2 { width:100%; height:100%; padding:10px; } The 10px padding of #box2 will be allocated outside of #box1. According to the box model, this is the cor