Skip to main content

Posts

Showing posts from March, 2011

CSS Shadows

What up? I have a couple of CSS gems I wanted to share with you. This first one is called a top shadow. Here is the effect: Compare this version to the not so fun version: Here is the code for that little effect: Another little gem is putting a drop shadow under images. Here is a screenshot within eCollege with two images, one has a drop shadow: If you like that shadow as it is, then use this code: Okay, now stay with me. That code should put a drop shadow on all images on the page (if you have multiple images). The code is essentially saying that whereever there is an <img>, then the browser is to apply those settings. You can also put drop shadows on <div>s if you would like. Just change the img { … } so that it reads If you want some pictures to have shadows and not others, then create a class. In the above example I had the two pictures and for the sake of illustrating the drop shadow, I wanted one to have the shadow and the oth...