You Are Here: Home » CSS Box Model

Box model: margins collapse and how to avoid it

The margins collapse is part of the specifications for the box model and the use of vertical margins . Often this 'phenomenon' is ignored, because of the use of other properties which prevent the collapse, but every so often, it can create a puzzling result that could be considered as an error of interpretation. The margins collapse happens when adjacent vertical margins (margin-top and margin-bottom), with ...

Read more

Box model: 2 columns – 1 fixed / 1 fluid

4 examples of 'box model' based on 2 columns layout with 1 fixed column and 1 fluid column. Using the position:absolute; : left column at fixed width / right column at fluid width left column at fluid width / right column at fluid width Using the float:left; : left column at fixed width / right column at fluid width left column at fluid width / right column at fluid width ...

Read more

Box model: 2 columns fixed and fluid

6 examples of 'box model' based on 2 columns: 2 columns fixed width aligned to the left 2 columns fluid width aligned to the left 2 columns fixed width centered aligned 2 columns fluid width centered aligned 2 columns fixed width aligned to the right 2 columns fluid width aligned to the right ...

Read more

Box-model: 1 column fixed and fluid

6 types of basic 'box model' based on a single column: 1 column fixed width aligned to the left 1 column fluid width aligned to the left 1 column fixed width centered align 1 column fluid width centered align 1 column fixed width aligned to the right 1 column fluid width aligned to the right ...

Read more

Introduction to the box model

As from the name, the content of a page is positioned inside boxes which can, at their turn, contain other boxes of content such as inline and block element. Those blocks, other then the content itself, can be made of margins, paddings and borders using the following css properties: margin: the transparent and empty space in between different boxes in units of measure or percent padding: the space in betwee ...

Read more

© 2012 Flepstudio.org

Scroll to top