-
Book Overview & Buying
-
Table Of Contents
Web Developer's Reference Guide
By :
Positioning elements is something we spend a lot of our time on when building sites and applications, so having a good understanding of how to place an element on a layout is crucial, especially when an element can have different positions depending on the available space.
Let's see what positioning is all about.
The position CSS property defines the location of an element.
There are five keyword values for the position property: static, absolute, relative, fixed, and sticky.
This is the default value of the position property. The element stays in the flow of the document and appears in the actual location where it's located in the markup.
The element is removed from the document flow and it's positioned in relation to its closest relative positioned ancestor element.
The element does not change positions unless one or several properties of top, right, bottom, or left are declared. It also creates a reference position for absolute positioned...
Change the font size
Change margin width
Change background colour