PDA

View Full Version : Can i use CSS to an image to add borders ?


Chapo
06-16-2008, 10:04 PM
I'm trying to use CSS to add borders to an image. The image is a a cell inside a table, but i can't figure out how to do it.

www.fotorazi.com

domedia
06-16-2008, 10:11 PM
Yes, just use the BORDER property in CSS like this:

img {border: 4px dashed red;}

Chapo
06-16-2008, 11:43 PM
Thats great.... but i can't find the image in the CSS panel to add the border property... i have a name to the image and it doesn't apear in the CSS. All i can se is apDivs... When i add a border with the CSS it adds the border to all the table and not the single image in the cell.

Ricky55
06-16-2008, 11:54 PM
The code Dom gave you should apply a border to all images, have you tried just manually adding the CSS rather than using the CSS panel.

Just add the border property within the style tags in the head of your doc.

<style type="text/css">

img {border: 4px dashed red;}

</style>

If you just want the border on a specific image and not all images find the image in question and give it a class, for example:

<img class="border" src="images/logo.gif" alt="CosmoFarmer 2.0" width="553" height="70" />

Then in your CSS

<style type="text/css">

.border {
border: 3px solid red;
}

</style>

Chapo
06-17-2008, 12:00 AM
thanx man.... i'm just starting at this... !!!!!