Since you are changing html it could be that another element over it (like body) takes style precedence. You should not only check the visual of the site, but inspect the HTML element directly with some developer tool in the browser to check if it works or not.