position relative css

by jujuiscody

HTML

<div class="firstMainDiv">
this is my first div for styling
<div style="background-color:black;">
this is my sub div of first main div
<div>
am inside main one seond sub elemnt
<p>
am para elemnt inside main one elem but third sub elem of one
<div>
am div
</div>
</p>
</div>
</div>
</div>
<p class="secondMainPara">
this is my second element in main flow
</p>
<div id="thirdMainDiv">
this is my third element in main flow
</div>
<p style="border:3px solid blue">
this is my fourth para element in main flow
<p>
this is my sub para elemnt in fourth main elemnt
</p>
</p>

CSS

div, p {
  color:red;
}

#thirdMainDiv {
  color:green;
}