Question

I've started with a very basic HTML5 site and set background-color of the header div to #3D7D99 but the browser displays it as #35728E. What's wrong?

EDIT: No the CSS property is not overwritten anywhere due to Safaris developer tools. (Try it yourself http://pigeonapp.github.io/)

Screenshot

Was it helpful?

Solution

If "very basic homepage" means you've already discounted CSS rules and whatnot, it could also be related to the monitor, os or browser.

Edit: Based on the examples, it's important to note that color picking from screenshots instead of picking from the hex rendered value in html will further complicate things due to browser rendering differences (specifically for images that don't have defined color profiles), safari being no exception.

OTHER TIPS

The color is overriden by another css rule. Try !important and see if it works, if it does, then you must remove !important an find the section in your CSS when it is overriden. Use Google Chrome Dev Tools or Firebug extension(Firefox) and inspect the element.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top