开发者

Div's background image on top of the div's elements

开发者 https://www.devze.com 2023-02-19 03:59 出处:网络
In the following code, the image (popcorn and cokes) goes on top of the background image. I need it the other way round, the background image to be on top of all the elements in the div, how can I do

In the following code, the image (popcorn and cokes) goes on top of the background image.

I need it the other way round, the background image to be on top of all the elements in the div, how can I do that?

Thanks a lot

 <div id='over' style="background-image:url('http://217.116.9.130/over.png');z-index:111; width:341px; height:291px;position:relative;" >

 purus interdum non. Nunc auctor 开发者_如何学编程porta nisi, et iaculis ligula suscipit in. Curabitur velit sapien, consectetur sed vestibulum nec, scelerisque pel

<img border=0 src="http://217.116.9.130/pic.jpg" style="position:relative;z-index:0;width:150px;height:150px;">

 lentesque ipsum. Sed eget arcu a erat accumsan luctus. In et nibh neque, in pulvinar nibh. Etiam porta, tellus eget vestibulum auctor, massa erat pretium ante, at 
</div>


You wont get the BG image above the other content. What I would do is add another div tag inside that one and set it to absolute position.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号