...

View Full Version : CSS decoration for images



h8ids
07-27-2007, 05:06 PM
Setting up a link with the use of an image.

Noticed the image has the link border automatically applied to it. Can I get rid of it?

I know how to remove decorations from text; but can't find a way to remove it from an image.

ahallicks
07-27-2007, 05:08 PM
a img {
border: 0;
}

h8ids
07-27-2007, 05:42 PM
Still seeing the ugly link border around the image.
Placed the following code directly into the page.


<span id="link">
<a href=viewdb4REVISED_2.php?Records=".$Records." style='border: 0;'>
<img src='CourseInRevision.gif' align='absmiddle'>
</a>
</span>

Also placed the following into the CSS template.


span#link {
border: none;
}

Jutlander
07-27-2007, 05:50 PM
You could switch out that "style='border: 0;'" with this:


class="noborder"

and then add this in your CSS:



a.noborder {
color: #fff;
background: transparent;
}


That is, if your page background is white.

_Aerospace_Eng_
07-27-2007, 05:52 PM
And if that still doesn't work, learn to read properly. The first solution suggested was

a img {
border:0;
}
You didn't follow directions.

h8ids
07-27-2007, 07:38 PM
Well, we learn everyday. Thanks guys.

I thought the # symbol was mandatory for CSS.


span#link {
border: none;
}

Evidently not, what I thought was a typo is correct and works!


a img {
border:0;
}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum