On 09/02/2014 20:53, David Hucklesby wrote:
On 2/9/14, 12:11 PM, Chris Rockwell wrote:
Interesting Chris. I'v always styled the <body> with margins,
positioning, sometimes padding...etc and it always has an effect. But have
you applied colors, images to that? This pen shows what I'm referring to (and
I've never experienced because of my mark-up conventions):
http://codepen.io/anon/pen/fkyEF.

Notice the border and padding honor the width, but not the color. I wonder
why...
______________________________________________________________________

I believe that's because backgrounds on <body> propagate to the viewport -
that's the root (<html>) element. Unless, that is, you have a background
specified for <html>.

Try adding this to your pen's CSS:

html { background-color: white; }

YES ! It worked for me too. So that's the problem solved, thank you. Just leaves me wondering why I've never come across that before.

Tim

--
Tim Dawson
Maolbhuidhe
Fionnphort
Isle of Mull  PA66 6BP

01681 700718
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to