WordPress.org

Ready to get started?Download WordPress

Forums

Stylesheet question (3 posts)

  1. Roy
    Member
    Posted 6 years ago #

    I suppose this is a simple thing, but...
    I've got this in my stylesheet:

    body {
    	margin:0;
    	background-image:url(/background.jpg);
    	color:#B65D41;
    	font-size: 62.5%; /* Resets 1em to 10px */
    	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
    	text-align:center;
    }

    The background.jpg is a small image that I 'tile', but before it loads, the area where it appears is white for a fraction of a second and not #B65D41 like I intend. Does that happen because the browser doesn't read the background colour fast enough (just as fast as the image that is) or should I change the stylesheet a little? The colours in the header, sidebar and footer are there immediately and I would like the rest of the page not to be a white flash before everything loads. Would the position of the background colour or the entire body part in the stylesheet make any difference?

    (It's a small thing, I know.)

  2. wxwx
    Member
    Posted 6 years ago #

    body {
    margin:0;
    background:#B65D41 url(/background.jpg) repeat;
    color:#B65D41;
    font-size: 62.5%; /* Resets 1em to 10px */
    font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
    text-align:center;
    }

  3. Roy
    Member
    Posted 6 years ago #

    Thanks.
    Stupid me, I thought that the "color" referred to the "body", but that's of course the text in the body.

Topic Closed

This topic has been closed to new replies.

About this Topic