We are using 1 index.html page that includes the tag, in the css the body is set to background colour #ddd. The index.html page is the main template that all other pages are included in. So i cant specify multiple background colours on the body as it uses only 1 index page.
The rest of the pages that are included into the index.html, for example: services.html will start with:
<div class="container">services content here</div>
Is it possible with CSS to somehow add a class on the container to switch background colours on the body? for example:
<div class="container bgWhite">services content here</div>
<div class="container bgDKGrey">contact content here</div>
<div class="container bgBlue">reviews content here</div>
Then do something like:
body .container.bgWhite body {background:white;}
Im not sure how exactly to do this?
EDIT:
Would this not work like someone on here posted:
$('.container').hasClass('bgWhite') {
$('body').css('backround', 'white');
}
How would i do this for multiple background colours though, if i wanted to switch between multiple background colours on the body?