About

Breaking

Tuesday 23 May 2017

CSS position property - Set relative, absolute, fixed value

CSS position property set an element positioning to display in web page.
CSS position property possible value relative, absolute and fixed.

CSS position:relative property

CSS position:relative property set element relatively followed by the relative offset from top, right, bottom or left.
Relative position is related to each and every around element properties (like margin, background-color and so forth).

सीएसएस स्थिति संपत्ति वेब पेज में प्रदर्शित करने के लिए एक एलीमेंट पोजीशनिंग सेट करती है
सीएसएस स्थिति संपत्ति संभावित मूल्य रिश्तेदार, पूर्ण और तय

सीएसएस स्थिति: रिश्तेदार संपत्ति


सीएसएस स्थिति: रिश्तेदार संपत्ति सेट तत्व अपेक्षाकृत ऊपर, दाएं, नीचे या बाएं से रिश्तेदार ऑफसेट द्वारा पीछा किया जाता है।
सापेक्ष स्थिति प्रत्येक और हर तत्व तत्व गुण (जैसे मार्जिन, पृष्ठभूमि-रंग और आगे) से संबंधित है।

Example Code:

<body>
    <div style="position:relative;left:120px;background-color:orange;width:120px;">This division part has
    relative positioning for each elements.</div>
</body>

 

Example Result:

 

 

 


CSS position:absolute property

CSS position:absolute property set element absolutely followed by the absolute offset from top, right, bottom or left.
Relative positioning element inside you can set absolute position element.

सीएसएस स्थिति: पूर्ण संपत्ति


सीएसएस स्थिति: पूर्ण संपत्ति सेट तत्व बिल्कुल सही से ऊपर, दाएं, नीचे या बाएं से ऑफसेट पूर्ण होता है
आप के अंदर का सापेक्ष स्थिति तत्व पूर्ण स्थिति तत्व सेट कर सकते हैं।

Example Code:

<body>
    <div style="position:relative;width:400px;height:150px;border:1px solid orange;">
        <div style="position:absolute;top:35px;left:220px;width:160px;background-color:orange;">This division part has relative positioning for each elements.</div>
    </div>
</body>

 

 

Example Result:

 


CSS position:fixed property

CSS position:fixed property set element in fixed, even if window scroll vertically or horizontally element is fixed place.
CSS postion fixed followed by the window offset top, right, bottom,left.


सीएसएस स्थिति: निश्चित संपत्ति

सीएसएस स्थिति: फिक्स्ड प्रॉपर्टी सेट एलीमेंट फिक्स्ड, भले ही खिड़की खड़ी या क्षैतिज तत्व को स्थान तय किया जाए।
सीएसएस पोस्टियन फिक्स्ड खिड़की ऑफसेट ऊपर, दाएं, नीचे, बाएं के बाद।

Example Code:

<body>
    <div style="width:400px;height:150px;border:1px solid orange;overflow: scroll;">
        <div style="position:fixed;top:35px;left:220px;width:100px;background-color:orange;">Fixed Element</div>


        CSS background-repeat property repeat image both side horizontally or vertically. CSS background-repeat property possible value is repeat, no-repeat, repeat-x (vertically repeat), and repeat-y (horizontally repeat).
        CSS background-repeat property repeat image both side horizontally or vertically. CSS background-repeat property possible value is repeat, no-repeat, repeat-x (vertically repeat), and repeat-y (horizontally repeat).
        CSS background-repeat property repeat image both side horizontally or vertically. CSS background-repeat property possible value is repeat, no-repeat, repeat-x (vertically repeat), and repeat-y (horizontally repeat).
    </div>

</body>

 

 

Example Result:

 

No comments:

Post a Comment