W3: CSS Layouts: Floats and Positions Flashcards
It is what you call to an HTML that has opening tag, closing tag and a content inside them.
Element
An element that has margin, has its own container and starts on a new line that forces a line-break at the end of the element.
Block
It is used to specify the location and behavior of element.
Float
An element that can flow with one another.
Inline
Positions of HTML can be controlled with CSS
Floats and positions
specifies how an element should float.
float property
The element floats to the left of its container
Left
The element floats to the right of its container
Right
Element does not float. Default.
None
Inherits float value of its parent.
Inherit
specifies the type of positioning method used for an element
position property
An element with ____ is not positioned in any special way; it is always positioned according to the normal flow of the page. Default.
Static or position: static;
An element with ____ is positioned relative to its normal position.
Relative or position: relative;
An element with ____ is positioned relative to the viewport, which means it always stays in the same place even if the page is scrolled.
Fixed or position: fixed;
An element with ____ is positioned relative to the nearest positioned ancestor.
Absolute or position: absolute;