Consider the grid design of the website and analyze the individual components. Learn than float is so useful and popular technique of building a first web of mesh of the three streams and footer of your website.
To explore the grid build the website you need to understand what a «stream». The thread is a site elements, arranged one behind the other. For example, it can be div elements by default are to each other. But the flow can be reconstructed, and change the position of block elements.
For flow control we use the property float, which can place the block on the left side or the right. In CSS file you need to register:
«name class or» block { float: right/left; }
The only drawback to float is the possibility of «nezianya» one unit to another.
To avoid nezianya, using clear: both — this property configures the flow block. Specify the width and height as maximum and minimum that a value based on the size of the content (text, images). Margin — set the value of auto to outer margins formed automatically depending on the location of the unit.
Sincefloat can place the blocks in two directions, it is customary to divide the site to the flows — left and right. If the programmer need only two threads, it leaves the left and right float, but if more than two, then he sets up with the help of margin indents. As it happens:
1 thread in the CSS file:
.column1 { float: left; width: 65px; min-height: 50px; margin-right: 9px; // 9px from the Central unit }
2 stream:
.column2 { float: left; // to the left block, but without the «nezianya», as used margin width: 80px; min-height: 50px; }
3 stream:
.column3 { float: right; width: 65px; min-height: 50px; }
Deal with the basement (.footer):
.footer { clear: both; // wrap on both sides }
So with the help of a float we did a grid site consisting of three threads.