Jump to content

Help with inherit positioning


airesofwar

Recommended Posts

I keep looking for how to use inherit positioning correctly but I am having troubles with this. inherit: Specifies that the value of the position property should be inherited from the parent element???Not really understanding that line. Could someone give me a example of how it should be written out?

Link to comment
Share on other sites

an element contained within another element, i.e.

<div id="parent">  <p id="child>Lorem Ipsom</p></div>

With inherit positioning applied to the <p> tag (child), if the the <div> (parent) had a positioning applied to it, the child would also have the same value for the positioning attribute of the parent.

Link to comment
Share on other sites

So when using it in the CSS code I would just state something like this.

.headerwrap {position: inherit; }

The in the <body> I would refer to it with something like this.

<div class="mainwrap">  <div class="headerwrap"></div></div>

Would that place the two over top of each other?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...