rvj wrote: > > > > > However, you can often use the containing block to get the same effect; > > when the width is 'auto' (the default), the content width will stretch > > to fill the containing block. > > http://www.w3.org/TR/REC-CSS2/visudet.html#q6 > > OK I think Ive done what you suggest. I have moved the border attribute to > the outer container block and set the height and width of the (containing) > block to auto. I have set the inner container (content) width and height to > 100%. This works OK under IE but still fails under Mozilla. > > Have I understood your suggestion correctly? No, you've got it switched around. :) If I have <div id="A"> <div id="B"> some content </div> </div> and A's width is 500px, the combined width of B's margin, padding, border, and content will equal 500px. If margin and padding are zero, and the border is 5px on either side, the content width of B will be 490px. 100% width is easily done; just don't specify a width. Height follows a different set of rules, though. --------------- I'm not sure I understand your specific problem. I can duplicate the result of your original markup in Mozilla--but it breaks in MSIE 5. What exactly are you trying to accomplish? Somehow two colored rectangles don't strike me as particularly critical web page content. Removing n.p.m.layout from follow-ups, (that is, if I've got the message headers right).
