Posts

Showing posts from July, 2016

Learning CSS

Image
CSS layout There are three kinds of layouts: Normal flow Layout, Float Layout, Absolute Position Layout. To understand those three kinds of layouts, the key point is to understand two concepts: normal document flow and box model. Normal document flow is the default way of arranging the HTML element from top to bottom or left to right in order without overflow and overlap by the value of the property, display. And the Box model means every HTML element is wrapped in a box, controlled by the properties: margin, padding, border, background. Normal flow layout is the whole layout in a single document flow, according to the normal document flow, the element’s layout behave in a normal way, top to bottom and left to right. Float layout is to use property float by its value left, right or none. The keynote is the float property only affect nearby elements’ layout, in order to erase that effect, there are two ways to eliminate that floating effect. clear : both ; // another w