So, I have a collection of div as following for My Page.
<div class="My_Page">
<div class="one">
<div class="two">
<a href="#"> Hi </a>
</div>
</div>
</div>
Then I have another page with same class= one and two.
<div class="Your_Page">
<div class="one">
<div class="two">
<a href="#"> Hi </a>
</div>
</div>
</div>
However, I am trying to apply different css to class= one and two based on what page they are in.
For example:
My_page: .My_Page .one{width:100%;}Your_Page: .Your_Page .one{width:50%}
I have one css file which contains both codes.
For either pages, these two css markups are loaded and I feel like there must be more efficient ways to apply different css based on what parental div it is in.
Or am I doing it right?
Thanks