32 CSS Positioning

Опубликовано: 02 Ноябрь 2024
на канале: Sudheendra S G
7
0

in this session, we explored CSS positioning, focusing on four types: static, relative, absolute, and fixed.

Static Positioning: The default positioning for HTML elements, where elements follow the natural flow of the document.

Relative Positioning: Moves an element relative to its original position without affecting the layout of surrounding elements.

Absolute Positioning: Positions an element relative to its nearest positioned ancestor. If no ancestor is positioned, it defaults to the top left of the web page.

Fixed Positioning: Positions an element relative to the browser window, keeping it in the same place even when scrolling.

The session included a practical exercise to create a rectangle with a circle inside, using the different positioning techniques. The goal was to solidify understanding of how these positioning methods work in CSS. The next lesson will involve a final project to apply these concepts in creating a flag of Laos.

Resource file

https://drive.google.com/file/d/13Jdq...