About Lesson
CSS layout techniques
Here are some of the most common CSS layout techniques:
- Display – This property specifies how an element is displayed. The most common values are block, inline, and inline-block.
- Float – This property specifies that an element should be floated to the left or right of its container.
- Position – This property specifies the position of an element on the page. The most common values are static, relative, absolute, and fixed.
- Top, left`,right, “bottom** – These properties specify the position of an element on the page.
- Width and height – These properties specify the width and height of an element.
- Margin – This property specifies the space between an element and its container.
- Padding – This property specifies the space between the content of an element and its border.
- Border – This property specifies the border of an element.
- Overflow – This property specifies what happens when the content of an element overflows its container.
You can use these properties to create a variety of layouts, from simple to complex. For example, you could use the display property to create a two-column layout, the float property to create a sidebar, and the position property to create a floating menu.