Pages

Wednesday, 3 February 2016

How to ignore parent css style

 How to ignore parent css style in style sheet:

example if you want to  ignore previous style like below red colored part of code:

<div class="separator" style="clear: both; text-align: center;">

Write simple style code like below:

Note: you have to mention "!important" in tag

<style>

div[style] {


clear: none !important; text-align:left;

}

</style>


while loading page browser ignore "clear: both;" and taking the code "clear: none !important;"

No comments:

Post a Comment