Jump to content

Strange background CSS issue


Recommended Posts

I am using a background image for my website and beneath the image i would like to change the background colour.

The background image is not tiled or repeated however and the background colour still displays as white when the page is longer than the background image.

Here is my CSS

body {
background-image:url(http://www.urltoimage.com/back.jpg); background-repeat:no-repeat;
background-color:53b4d9;
   font-size: 11px;
   font-family: Verdana, Arial, Helvetica, Sans-Serif;
   color: #ffffff;
   text-align:center;
}

Link to comment
Share on other sites

Hi,

You have missed a "#" before the hex-code in background-color.

body {
background-image:url(http://www.urltoimage.com/back.jpg); background-repeat:no-repeat;
background-color:#53b4d9;
font-size: 11px;
font-family: Verdana, Arial, Helvetica, Sans-Serif;
color: #ffffff;
text-align:center;
}

TIP: Use http://jigsaw.w3.org/css-validator/ to track errors in your CSS.

If you us Firefox as your browser, you can download Firebug (www.firebug.com) as debugger.

Regards,

Trine

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...