0

html:

<div id="Home"></div>

css:

#Home {
position: relative;
background: url("../Pictures/GoodAssTunes.jpg") ;
height: 800px;
width: 100%;
margin-left: -8px;
margin-top: -8px;
z-index: 1;
background-size: 100%;

}

But it wont display for some reason. I've tried it with background: and background-image: with the shorthand and just url("GoodAssTunes.jpg"). But it doens't work.

Carl0s1z
4,7237 gold badges34 silver badges49 bronze badges
asked Apr 14, 2014 at 7:42
3
  • There's nothing wrong with your code, are you sure your image is in the spot you say it's in? Alternatively, have you opened it up to see if the image is corrupt? Commented Apr 14, 2014 at 7:43
  • Try looking in Firebug, to see if the image is coming up as a 404 Commented Apr 14, 2014 at 7:46
  • code is good! Check the case as sometimes CSS can be sensitive to filename formatting Commented Apr 14, 2014 at 7:48

2 Answers 2

1

http://jsfiddle.net/JD2ft/ It works fine see

No problem check with Pictures/GoodAssTunes.jpg

 #Home {
 position: relative;
 background: url("http://placehold.it/350x150") ;
 height: 800px;
 width: 100%;
 margin-left: -8px;
 margin-top: -8px;
 z-index: 1;
 background-size: 100%;
 }
answered Apr 14, 2014 at 8:11
Sign up to request clarification or add additional context in comments.

Comments

0

Open Google Crome

rightclick open view page source or Inspect element

and see the link

it should open the image

answered Apr 14, 2014 at 8:11

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.