Log in

View Full Version : Applying CSS border to image



lilyoungfella
10-08-2008, 04:37 AM
i have this css that adds white border to images . The problem is that the background of my website is white and it makes the code useless. Can i add something to the code that would add "drop shadow" the border?

.img {
border: 1px solid #ffffff;
}
.photo {
border-width: 8px 8px 20px 8px;
border-style: solid;
border-color: #000000;
}

TheJoshMan
10-08-2008, 05:33 AM
why not just change the color of the border itself?

lilyoungfella
10-08-2008, 06:01 AM
why not just change the color of the border itself?

i'll be changing the border color if it's not really possible to have that "drop shadow".

TheJoshMan
10-08-2008, 11:24 AM
http://www.dynamicdrive.com/style/csslibrary/item/css-gradient-shadow/

bizwala
10-16-2008, 06:15 PM
you can get drop shadow from following code

.img-shadow {
float:left;
background: url(images/shadowAlpha.png) no-repeat bottom right !important;
background: url(images/shadow.gif) no-repeat bottom right;
margin: 10px 0 0 10px !important;
margin: 10px 0 0 5px;
}

.img-shadow img {
display: block;
position: relative;
background-color: #fff;
border: 1px solid #a9a9a9;
margin: -6px 6px 6px -6px;
padding: 4px;
}

You can mail me to on flash@bizwala.com for exact file or reach out to site bizwala.com for more help