Jump to content

Drop Shadows with CSS


chiprivers

Recommended Posts

Now that's pretty cool ... and it's OLD if the author is concerned about the evil Netscape 4!

 

It works fine in FF and IE6. Here is the test run code:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
.box { float: left; width: 100px; height: 100px; }
#boxContent { border: none; background: #9FC; }
#boxContent { position: relative; left: -2px; top: -2px; }
#boxContainer { position: relative; background: #666; margin: 4px; }
</style> 
</head>

<body>
<div class="box" id="boxContainer">
<div class="box" id="boxContent">
A drop shadow around a box
</div>
</div>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/74651-drop-shadows-with-css/#findComment-378104
Share on other sites

It validated fine and works in Firefox and IE.

 

I'll check out Safari, Opera and Konquerer.

 

Frankly, the only browsers I could see it potentially not working in would be old IE 5 win and Mac and Old Netscape. And at this point, most designers have stopped trying to accommodate those dinos anyway - it's too easy to update IE to at least 6 and anyone using Netscape 4 has no idea what the web looks like anyway.

 

As for text-based browsers ... well ... they wouldn't see the graphic either.

 

HOWEVER, I don't know if the technique will work on an image (which I now realize is what chiprivers asked).

Link to comment
https://forums.phpfreaks.com/topic/74651-drop-shadows-with-css/#findComment-378815
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.