Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Understanding CSS Positioning | Mastering CSS Positioning
Advanced CSS Techniques

book
Understanding CSS Positioning

While developing modern web sources, we always meet the following tasks: show descriptive text over the product card; open a popup message; demonstrate a modal window, and, of course, a convenient showing of the mobile menu. To achieve all these goals, we use the position property.

position: static | relative | absolute | fixed | sticky

The position property is utilized for altering the positioning of an element. By default, all elements possess position: static. Once a different value is assigned to the position property, we can also use the properties of top, left, right, and bottom to position an element according to our requirements. We will consider all of them further.

Default document flow

The default document flow is how elements are positioned on a web page without any specific positioning instructions applied. Elements are arranged in the order they appear in the HTML markup.

Note

Maintaining all elements within the default document flow is recommended, except for situations where positioning is necessary for decorative purposes or to achieve specific functionalities such as popups, modal windows, drop-down menus, mobile menus, etc.

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 2. Capítulo 1
some-alt