View on GitHub

201-reading-notes

More CSS Layout

Read: 08 submission

You can go back to the home page.

In this blog I will give a summary for the chapter 15 of the book: “HTML & CSS” :books:

Chapter 15: Layout

Key Concepts in Positioning Elements

  1. Building Blocks:
    • Block-level elements start on a new line <h1> <p> <ul> <li>
    • Inline elements flow in between surrounding text <img> <b> <i>
  2. Containing Elements: If one block-level element sits inside another block-level element then the outer box is known as the containing or parent element. <div>

float property

Position property in CSS

Kyewords:

position:static: default

position:relative: moves an element in relation to where it would have been in normal flow.

position:absolute: the box is taken out of normal flow and no longer affects the position of other elements on the page.

position:fixed: a type of absolute positioning that requires the position property to have a value of fixed

pos

z-index: to control which element sits on top.

float: to take an element in normal flow and place it as far to the left or right of the containing element as possible.

clear: to say that no element (within the same containing element) should touch the left or righthand sides of a box.

width This sets the width of the columns

float This positions the columns next to each other

margin This creates a gap between the columns.

Resolution refers to the number of dots a screen shows per inch.

Fixed width layout: designs do not change size as the user increases or decreases the size of their browser window. Measurements tend to be given in pixels.

Liquid layout designs: stretch and contract as the user increases or decreases the size of their browser window. They tend to use percentages.

Grid: the placement or arrangement of visual elements.

Multiple Style Sheets