I am trying to put an image in my body using id div with background image. I don’t understand why the image doesn’t appear when I browse in Google Chrome?
I use almost the same code on my index page and it works great.
HTML:
<body>
<div id="body">
<div id="rainforestimage"></div>
</div>
</body>
CSS
#body {
width:1024px;
height:auto;
background-image:url(../images/background2.png);
margin:0 auto;
background-repeat:no-repeat;
overflow:hidden;
}
#rainforestimage {
background-image:url(../images/exhibits/rainforest.png);
width:1024px;
margin:0 auto;
margin-top:74px;
height:364px;
position:absolute;
z-index:1;
box-shadow: 0px 8px 12px -4px rgba(0,0,0,0.46);
}
source
share