Jump to content

css drop shadow


chronister

Recommended Posts

Hi folks,

 

I need a little assistance getting this css only drop shadow to apply to my image.

 

I am trying to place a drop shadow on my image, and since the background color is not finalized yet, I don't want to do it in photoshop(my preference for drop shadows.) and because transparent gif's don't do well with drop shadows I am trying to get this pure css solution to work.

 

Here is the code

<div id="shadow-container">  
         <div class="shadow1">  
             <div class="shadow2">  
                 <div class="shadow3">  
                     <div class="container">  
                      <a href="/birthday.php" >
  	<img src="/includes/photos/1015.jpg" alt="Happy Joe's Stories" align="left" border="0" hspace="10" vspace="10" width="450" /></a>   
                     </div>  
                 </div>  
             </div>  
         </div>  
    </div> 

 

the css

 

#shadow-container {  
     position: relative;  
     left: 3px;  
     top: 3px;  
     margin-right: 3px;  
     margin-bottom: 3px;  
}  
   
#shadow-container .shadow2,  
#shadow-container .shadow3,  
#shadow-container .container {  
     position: relative;  
     left: -1px;  
     top: -1px;  
}  
   
     #shadow-container .shadow1 {  
         background: #F1F0F1;  
     }  
   
     #shadow-container .shadow2 {  
         background: #DBDADB;  
     }  
   
     #shadow-container .shadow3 {  
         background: #B8B6B8;  
     }  
 #shadow-container .container {  
         background: #ffffff;  
         border: 1px solid #848284;  
         padding: 10px;  
    }

 

The page in question is..  http://home.happyjoes.net/about/stories.php

 

I am in the process of redoing the site so it is a work in progress. As you can see, the div box is appearing above the image rather than being applied to the image.

 

Any help is appreciated.

 

Thanks,

 

Nate

Link to comment
Share on other sites

I have 5 opening div tags and 5 closing tags. My a tag is properly surrounding the img tag. I thought that too and checked it before I posted here. So that is not the issue.

 

Anyone else? Thanks in advance for the help. I am fairly css challenged.

 

Thanks,

 

Nate

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.