I have the following scenario.
In our site header, One CSS property background-image:url(image.png);
is overridden with background-color:red!important.
There is no way I can change the HTML or class since they are generated dynamically by jQuery.
Even the property value background-color:red!important
should stay in tack and adding !important
to the background-image will affect other pages.
But only one page, I want the background image to show overriding the background-color. How I can do this?
Hope I made sense.
UPDATE
Follow are the CSS selectors and the correct DOM structure (on all pages in header)
#my_id.section{
background-color:red!important;
}
#my_id.section{
background-image:url(image.png); /*.. it's overridden with bg-color..*/
}
On a only one page I want
#my_id.section{
background-color:red!important;
}
#my_id.section{
background-image:url(image.png)!important; /*.. this should not be overridden with bg-color even though it has !important..*/
}
Please note: Since the CSS are generated dynamically and users can change their values, they cannot be adjusted.