문제

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

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top