CSS: Background Colour and Images

Note: Here in WordPress you can’t set a background colour to your whole post as that would require amending the CSS file of the whole page. You can however create a <div> and then fill its background with a colour of your choosing. For more click here!

Setting up the background color of your page with CSS is easy. See the example below for CSS code that will make the background colour of a linked HTML page be light blue.

body { background-color: #b0c4de; }

To learn more about colours and their codes, click here!

You can also use an image as background for your whole post or for a div. If the image is too small to cover the whole area intended to cover, the image will repeat itself until it does so. See the example below for CSS code that will make the background image of whole page to show Mickey Mouse (a picture taken from the internet).

body { background-image: url("http://www.quotesvsfun.com/wp-content/uploads/2015/01/mickey-mouse-pics-wallpaper21.jpg"); }

Be cautious when you put images as backgrounds: if you decide to use them, your text must still be readable. That generally means that if you use a dark background your text must be light or the opposite.