W3C home > Mailing lists > Public > www-style@w3.org > September 2004

Box model: min-margin and max-margin, max-padding and min-padding

From: Elliotte Harold <elharo@metalab.unc.edu>
Date: Tue, 28 Sep 2004 14:47:02 -0400
Message-ID: <4159B1A6.3050109@metalab.unc.edu>
To: www-style@w3.org

I've encountered what appears to be a serious omission in the CSS 2 box 
model that seems to continue in CSS3.

You can set min-widths and max-widths on boxes. However, you cannot set 
min-margins and max-margins, and min-paddings and max-paddings on boxes. 
These can only be given as fixed values. This causes a problem when 
using a normally positioned box up against an absolutely positioned box. 
  In this circumstance (typical of a Navbar on a web page) it is 
necessary to set the margins of the regularly positioned box wide enough 
to make room for the absolutely positioned box. However, that width can 
change depending on whether the absolutely positioned box's width or 
min-width is being used. We need a max-margin (max-margin-right, 
max-margin-left, etc.) and min-margin and max/min-padding properties so 
we can match sizes of adjacent boxes to each other.

-- 
Elliotte Rusty Harold
elharo@metalab.unc.edu
Received on Tuesday, 28 September 2004 18:47:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:32 GMT