Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
You could have two CSS styles applying the background colours.
1. First style is in a stylesheet linked early in the webpage HTML structure, which loads your background colour.
2. Second style is in another stylesheet linked later in the webpage HTML structure, which loads the other white colour and overwrites your style.
Your browser will load the HTML page from top to bottom, which would explain this problem.
Thanks, that makes a lot of sense, but I have no idea where such a second stylesheet could come from. Here’s a link
Max
(@clementsm)
I don’t think it is your CSS, I think you have left a tag out of the end of your body tag…
If you view the source of your site you see this:
<body class="home page page-id-520 page-template page-template-page-accueil-php"<div id="fb-root"></div>
Facebook’s javscript is replacing the <div id="fb-root"></div> with code containing an .fb-reset class, that will rest the background to white as the class is being appended to your body tag.
To fix it, open your header.php, and make sure that you have actually closed your body tag properly, ie., it should be something like
<body <?php body_class($theme); ?>>
I think you left the second “>” out 🙂
Thank you so much Max. Very impressive. I could have searched for years without even noticing the absence if this tag. 🙂
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
It is difficult to notice absence of tags, but W3C’s validator can pick these issues out.