HTML and CSS Reference
Margin is 0.
Left padding is equal to the full width of the left column, including left and right padding.
Right padding is equal to the full width of the right column, including left and right padding.
Minimum width is equal to the full width of the left column plus the full width of the center column,
including the left and right padding of both.
The template in Listing 5.5 should make this clearer. The rules in the Fixed Values section should be copied
directly into your stylesheet without change, aside from the IDs of the columns. Then you can set the values in
the Chosen Values section to your liking. I've used em measurements here, but pixels, inches, and other length
units work as well. Finally, you calculate the values in the Calculated Values section based on the specified
formulas and the numbers you entered in the second section.
This would be somewhat easier if CSS supported variables and simple calculations. However, it doesn't, so you
have to determine the right sizes by hand using these formulas. Then insert the relevant literal values in your
Listing 5.5. Three-Column Stylesheet with Fixed-Width Left and Right Columns, Liquid Center Column
/* Fixed Values */
/* Chosen Values */
LC = Left column
RC = Right column
CC = Center column
width: 9em; /* LC width */
padding-right: 1em; /* LC right padding */