How is the positioning of elements in CSS?

In this response we will focus on how does the positioning of elements in CSS. You should start with a definition. Positioning in CSS is a control method and a display location of the element on the page of the created site, which is carried out using the position property. Just want to note that this property has 4 values: absolute (absolute) relative (relative), fixed (fixed) and static (static). Now let’s take a closer look at each of them.

Fixed positioning of all elements on a web page relative to the browser window. Such items are not included in the General order of placement on the page and can be overlaid on top of other elements. When scrolling long pages, because it creates the effect of immobility of the objects.

For the static positioning of all elements on the page are set to the default settings. They are displayed in the browser in a descending order. Using the static value if necessary, you can specify static positioning in a style sheet.

Relative — elements are typically used as the parent for the absolutely positioned elements. The page is the empty space in those places, where could is this element without a position while it is placed relative to the place where was supposed to appear on the page.

And the end, absolute positioning, in which elements are removed from the General flow of the page and move it to the top of the web page, if necessary, overlapping the other elements.

Leave a Comment

Your email address will not be published. Required fields are marked *