samma
06-20-2010, 11:08 AM
I've set a background image within a <div> container. locally, it displays fine.
When I upload, the image does not display. I've posted below what I hope is the relevant snippets of code. I'm fairly new to this - please don't be shy with comments/feedback, and particularly any questions if i've missed any info.
If it would help, you can look at the source directly (nothing too exciting to see, just a pet project in start up mode): www.upside-down-land.com
I've checked that I also uploaded the image, and to the correct directory too. www.upside-down-land.com/resource/postHead.jpg
I've browsed through a few forums, but not quite found anything that would offer a suggestion for where I've gone wrong. I'm hoping more experienced eyes will spot something silly I'm overlooking.
Kind Regards,
Sam
<div id="newsPost">
<div id="newsPostBucket">
<div id="newsPostDate">[Date]</div>
<div id="newsPostType">[Type]</div>
<div id="newsPostTitle">[Title]</div>
<div id="newsPostBody">[Content]</div>
<div id="newsPostFooter">[Link to top]</div>
<div id="newsPostGap"></div>
</div>
</div>
#newsPost {
height: 290px;
width: 700px;
padding-left: 0px;
right: 0px;
left: 50px;
position: relative;
}
#newsPostBucket {
background-repeat: no-repeat;
height: 290px;
width: 700px;
background-image: url(Resource/postHead.jpg);
}
#newsPostDate {
height: 20px;
width: 330px;
float: left;
color: #FFF;
margin-right: 0px;
padding-left: 20px;
}
#newsPostType {
float: left;
height: 20px;
width: 330px;
text-align: right;
color: #FFF;
padding-right: 20px;
}
#newsPostTitle {
height: 30px;
width: 680px;
float: left;
color: #FFF;
padding-left: 20px;
font-size: 16px;
font-weight: bold;
font-style: normal;
}
#newsPostBody {
float: left;
height: 200px;
width: 680px;
color: #039;
background-repeat: no-repeat;
padding-left: 20px;
}
#newsPostFooter {
float: left;
height: 20px;
width: 680px;
text-align: right;
color: #039;
padding-right: 20px;
font-size: 10px;
}
#newsPostGap {
float: left;
height: 20px;
width: 700px;
color: #039;
}
When I upload, the image does not display. I've posted below what I hope is the relevant snippets of code. I'm fairly new to this - please don't be shy with comments/feedback, and particularly any questions if i've missed any info.
If it would help, you can look at the source directly (nothing too exciting to see, just a pet project in start up mode): www.upside-down-land.com
I've checked that I also uploaded the image, and to the correct directory too. www.upside-down-land.com/resource/postHead.jpg
I've browsed through a few forums, but not quite found anything that would offer a suggestion for where I've gone wrong. I'm hoping more experienced eyes will spot something silly I'm overlooking.
Kind Regards,
Sam
<div id="newsPost">
<div id="newsPostBucket">
<div id="newsPostDate">[Date]</div>
<div id="newsPostType">[Type]</div>
<div id="newsPostTitle">[Title]</div>
<div id="newsPostBody">[Content]</div>
<div id="newsPostFooter">[Link to top]</div>
<div id="newsPostGap"></div>
</div>
</div>
#newsPost {
height: 290px;
width: 700px;
padding-left: 0px;
right: 0px;
left: 50px;
position: relative;
}
#newsPostBucket {
background-repeat: no-repeat;
height: 290px;
width: 700px;
background-image: url(Resource/postHead.jpg);
}
#newsPostDate {
height: 20px;
width: 330px;
float: left;
color: #FFF;
margin-right: 0px;
padding-left: 20px;
}
#newsPostType {
float: left;
height: 20px;
width: 330px;
text-align: right;
color: #FFF;
padding-right: 20px;
}
#newsPostTitle {
height: 30px;
width: 680px;
float: left;
color: #FFF;
padding-left: 20px;
font-size: 16px;
font-weight: bold;
font-style: normal;
}
#newsPostBody {
float: left;
height: 200px;
width: 680px;
color: #039;
background-repeat: no-repeat;
padding-left: 20px;
}
#newsPostFooter {
float: left;
height: 20px;
width: 680px;
text-align: right;
color: #039;
padding-right: 20px;
font-size: 10px;
}
#newsPostGap {
float: left;
height: 20px;
width: 700px;
color: #039;
}