0
css
can anyone tell me briefly about positioning and layout in css?
3 Réponses
+ 1
guransh singh hello,
first consider that elements could be inline or block level.
You have several ways to position elements:
1-static (set by default to all elements).
2-relative.
3-absolute.
4-fixed.
5-sticky.
Also you can add a 6th:
6-float (right or left will induce the following content to wrap around it).
https://developer.mozilla.org/en-US/docs/Web/CSS/position.
If two or several elements are on top of each others,you can attribute a 'z-index' property to each of them to decide which one will be forward,which one backward or intermediate.
Take a look also at the 'display' property which could be flex,grid,inline-block,block or inline...
That said you'll need to go deeper in the topics by googling that properties (you might also find stuff about that with the search tool of that same discuss section at the top right) and practice them.
Don't know what you know yet about it, so hope it will help a little.