i’m trying to get my background image to display within the header div but it is not displaying. Can someone tell where on what i’m doing wrong?
css code:
#header{
width:900px;
/*background-color:#009999;*/
background-image:url('../images/background_img.jpg');
float:left;
text-align:center;
}
html code
<body>
<div class="contentwrapper">
<div id="header">
hello
<!--<div id="logo">
<img src="images/small_gama_logo.png" />
</div>
<div id="company_name">
<h1>Gama Corporate Services Sdn Bhd</h1>
</div>-->
</div>
<div id="navbar">
<ul>
<li>Home</li>
<li>About</li>
<li>Contact</li>
</ul>
</div>
Add height to your div.
If you remove it, it actually does still display, so you must really check your paths for the img, plus the name. Make sure it is all correct and that the img exists in the directory you intend.
I copy/pasted your code and added only height, changed the img location so your code is fine. Must be a problem with the img.
http://jsfiddle.net/Kyle_Sevenoaks/qtenp/