开发者

div background-image: need help with code

开发者 https://www.devze.com 2023-03-24 07:40 出处:网络
If you Firebug this page: http://www.radiumhosting.com/web-hosting/vps-cloud-hosting look at the VPS cloud slider. The background image isn\'t fully behind the border to the right of the Storage tab.

If you Firebug this page: http://www.radiumhosting.com/web-hosting/vps-cloud-hosting look at the VPS cloud slider. The background image isn't fully behind the border to the right of the Storage tab.

I added this to the end of the code to place the image on the background:

<div style="margin: -229pt 0pt 0pt -20pt;">
<div style="background-image: url(/images/stories/cloud-background2.png); height: 315px; width:   710px;"></div> 
</div>开发者_运维百科;

Compatibility View in IE9 allows the image to be displayed on top of most elements. What should I change?

Thanks, Mark


You don't need to use new div's for the background. Just add the .cloudbackground class to <div class="rt-block">. Then use the HTML and CSS code below instead:

HTML:

<div class="rt-block cloudbackground">

CSS:

.cloudbackground {
    background: url("/images/stories/cloud-background2.png") no-repeat;
}

This will fix all your issues including making it work in compatibility mode.


You might want to look into the z-index CSS property with a negative value.

0

精彩评论

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