tags:

views:

201

answers:

5

I want to achieve this in CSS - not CSS3 as I want it to be supported by all browsers bg with shadows on all sides

ie a div containing content, with the shadows on every side. The top area will be used for navigation. I have searched for tutorials but so far to no avail. Help!

A: 

You have to create several images. One for the left side. One for the right. One for the bottom, etc. And then have several div's and set the background for each of them.

Knarf
A: 

You can do this with three divs, assuming they are all the same (fixed) width:

<div class='top'>
</div>
<div class='middle'>
<p>Hello World!</p>
</div>
<div class='bottom'>
</div>

.top{
  background:url('top.png');
  height:20px;
  width:800px;
}
.middle{
  background:url('middle.png') repeat-y;
  width:800px;
  }
.bottom{
  background:url('bottom.png');
  height:20px;
  width:800px;
}
fredley
A: 

Alternatively, you can make one big image, and use that as the background for the entire content area; then hard-code the positions and sizes of the contained elements.

tdammers
+2  A: 

CSS3pie is a tool that lets you use some css3 properties in IE.

What you're trying to do is fairly widespread css3 in newer browsers, and emulated really well (and easily) in IE with the .htc file you can download from there.

As for the markup, I see just 2 elements, with the top one floated right, for example. You'd have to play with z-index to hide excess shadows. In that site there's also a very similar effect, you should be able to adapt it for your needs.

Razor
@Razor good reference. I have used it before some months, but for some reasons I left it. Thanks you remind it!
Sotiris
+1  A: 

As Ventus said is not possible to use css shadows with ie (only ie9). But you can use shadowOn. It's a great jquery plugin and very easy in use. With it you will have cross browser compatibility.

Sotiris