Brian Rosenthal's Weblog

4/10/2005

Adding a drop shadow to a web page that is centered

Filed under: — brian @ 2:46 pm

Adding a background that includes a drop shadow to a web page is tricky because the drop shadow must stay around the content.

Here is the effect:
Click here to view the page below


<html>
<head>
<base href="http://www.robocommerce.com/" />
<title>Centering Test<title>
<style type="text/css">
<!--
body {
    margin: 0px;
    background-image: url(/test/aaron/images/bg.jpg);
    background-position: center top;
}
div#main {
    margin: 56px 0px 0px 10px;
    width: 739;
    height: 647;
    background-image: url(/test/aaron/images/bg2.gif);
    background-position: top;
    color: white;
}
// -->
</style>
</head>
<body>
<center>
<div id="main">Body text</div>
</center>
</body>
</html>

Comments

The URI to TrackBack this entry is: http://blog.brianrosenthal.org/2005/04/10/adding-a-drop-shadow-to-a-web-page-that-is-centered/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Sorry, the comment form is closed at this time.

Powered by WordPress