CSS Tutorial in Hindi [Part 35] - CSS Position Property

preview_player
Показать описание
In this video i will talk about Position Property in CSS

The position property specifies the type of positioning method used for an element.

There are four different position values:

static
relative
fixed
absolute

Elements are then positioned using the top, bottom, left, and right properties. However, these properties will not work unless the position property is set first. They also work differently depending on the position value.

position: static;
HTML elements are positioned static by default.

Static positioned elements are not affected by the top, bottom, left, and right properties.

An element with position: static; is not positioned in any special way; it is always positioned according to the normal flow of the page:

position: relative;
An element with position: relative; is positioned relative to its normal position.

Setting the top, right, bottom, and left properties of a relatively-positioned element will cause it to be adjusted away from its normal position. Other content will not be adjusted to fit into any gap left by the element.

position: fixed;
An element with position: fixed; is positioned relative to the viewport, which means it always stays in the same place even if the page is scrolled. The top, right, bottom, and left properties are used to position the element.

A fixed element does not leave a gap in the page where it would normally have been located.

position: absolute;
An element with position: absolute; is positioned relative to the nearest positioned ancestor (instead of positioned relative to the viewport, like fixed).

However; if an absolute positioned element has no positioned ancestors, it uses the document body, and moves along with page scrolling.

Note: A "positioned" element is one whose position is anything except static.
Рекомендации по теме
Комментарии
Автор

Never saw that much clear explanation like you just like i am learning from my big bro...

akshaysatav
Автор

Sir, I'm from to Pakistan, But I like your experience in HTML, CSS, JS, Angular JS .You are great teacher at YouTube.

officialnews
Автор

wah kia explanation de hy ap ny absolute ki position k bary mai abhi tak koi aisa acha explanation nhi daika, sirf apny acha explain kia ... good

fahadkhan
Автор

Bhai, your explanation was fantastic.
You actually cleared the concepts
You are amazing in explaining
Thank You
God Bless!!!

jmufaddal
Автор

Sir Aap Legend hai Best explanation ever ❤️

uzair
Автор

Watched many videos at youtube but this one is perfect can't find better explanation than this

Techtrail
Автор

sir maine aapaki vedeo dekh kar bahut kuch sikha hai sir aap great person ho
thank you sir🙏🙏🙏🙏

monuchauhan
Автор

Ajj first time itni clear samaj aayi (position property)... thankyou sir for best explanation 🙏🙏🙏🙏 now i am subscribing this channel 🎉

bindassajjubhai
Автор

sir, you really helped me a lot
I appreciate your work.
this property giving me a headache. now I am tension-free.

rajatbharti
Автор

The best explanation amoung all YouTube videos

sampatjadhav
Автор

Kammal !
Your Teaching style is Best.
We Understand properly difference between Relative abd Absolute.

mujawarmessi
Автор

muje aaj tk position smj ni aya the av jake clear hua thankx sir

shubhamdhiryan
Автор

Best tutor ever for programming language ❤🎉

namratasalvi
Автор

Excellent explain i have seen ❤️❤️❤️❤️ one of my favourite channel for learning programming language

ravendrasharma
Автор

superv explaination better then most of the yt videos .. you deserve more views .

bbkivinesbigfan
Автор

Thank you Sir for clearing doubt related to "absolute".

shivamgorle
Автор

Your explanation was awesome sir. Thanks for creating this wonderful CSS playlist ✨.

harshitaditya
Автор

sir no one can explain this better then you..thank you sir from Pakistan

abdullahzeb
Автор

best one.. minimum efforts with max knowledge

durgaprasaddas
Автор

Maja aagaya bhai, saari confusion clear ❤️

prashantsingh