I can't get this picture in the background of my div

Can someone point me in the right direction? I don't see why I can't get the black_bottom.png as background in rounded corners.

This is the css:

@charset "utf-8";

/* CSS Document */

html, body { color: #444141; font-family: 'trebuchet ms' !important; font-size: 12px; margin: 0px; padding: 0px; height: 100%; background: #eaeade;} .justyParagraph { text-align: justify;} a img { border: 0;} .clearer { clear: both;}

.rounded_corners{ background: url(../images/box/black_bottom.png) no-repeat left bottom; color:#FFF; padding: 8px; width: 380px; border: 2px solid #4e4b4b; height: 450px;

            }

div#blockdark { height: 517px; left: 450px; position: absolute; top: 130px; z-index: 1000000; width: 360px; visibility: visible;

}

This is the HTML

<div id="blockdark"> 
<div class="rounded_corners">

Content


       </div>
</div>

Thisi sa example, maybe it has something to do with the javascript for rouinded corners?

http://www.coldcharlie.nl/test/


Be sure that ../images/box/black_bottom.png is the path from your stylesheet to the image file. Everything else looks correct, but people don't always realize that paths are relative to the css file and not the page that includes it.

Try an absolute URL there and see if it appears then. If it does, you know your relative URL isn't right.


EITHER:

Your image doesn't exist at this relative path: ../images/box/black_bottom.png.

OR:

Your image is blank.

OR:

Your image has more blank space in the image's left bottom corner than the dimensions of your div.rounded_corners, and therefore the background image "overshoots" your div.


HI...

This might give you something to have a look at...

<html>
<head>
<style type="text/css">
    #mydiv{
        background-image:url('http://www.theregister.co.uk/Design/graphics/std/logo_414_80.png');
    }
</style>
</head>
<body>
<div id="mydiv">
<p>Mary had this little lamb...</p>
<p>Mary had this little lamb...</p>
<p>Mary had this little lamb...</p>
<p>Mary had this little lamb...</p>
<p>Mary had this little lamb...</p>
<p>Mary had this little lamb...</p>
</div>
</body>
</html>

Just something to get you started.

Also, your div#blockdark doesn't validate - use #blockdark instead...

(The id should be unique, so tag type doesn't matter)

链接地址: http://www.djcxy.com/p/89174.html

上一篇: Autoresize css工具提示

下一篇: 我无法在我的div背景中获得这张照片