Jump to content

getting background image to work


Recommended Posts


I'm new to this so apologise if I am doing something dumb. I cannot get my image to display and not sure why.


the code is:


body {background-color: #404040;background-image: "Images/layer_bg.jpg"; background-repeat: no-repeat center top;}


The directory looks like this


website name (folder)





the image I want displayed is obviously in Images.


Thanks in advance,


Link to comment
Share on other sites

You've also got the background position values in the background-repeat declaration.




background-repeat: no-repeat center top;


This should be written out as

background-repeat: no-repeat;background-position: center top;

or if you'd like to have all of them under one selector you could write them out as

body {background: #404040 url('Images/layer_bg.jpg') no-repeat center top;}
Link to comment
Share on other sites

  • 2 weeks later...

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...