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,


Share this post

Link to post
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;}

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...