Jump to content
Jammin87

getting background image to work

Recommended Posts

Hi,

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)

Images(folder)

mbb.css

home.html

 

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.

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

Loading...

×
×
  • Create New...