Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IMG HREF Border Color Question 2

Status
Not open for further replies.

xyzuser

Technical User
Aug 13, 2008
96
US
I have an IMG with an HREF link.
Code:
 <P class=Normal><a href="#top"><IMG  src="images/Topofpage.gif"></a></P>

The image gets a blue border. After it's been clicked on, the border changes to a type of red. Is there some default that sets this? I know I can set border=0 but I like the red border and would want to have it all the time and not the blue border. I've taken everything that even references border out, including my a.Link peuso-class and the "normal" class definition, and nothing makes a difference.

Sorry if this is a basic question...
Thanks
 
Blue links, purple visited and red active is the browser standard for links. When links are text, the standard is that they're underlined. When links are images, the standards is a border around the image.

Since the border is around the image and not around the anchor (<a>) tag, you need to address the image instead of the anchor. The best way to do it is with this selector (it means that this addresses all the images that are found within anchor elements):
Code:
a img {
  border-color: red;
}
This is CSS, which should be used for all styling on your page.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
The old way is just:

Code:
<a href="#top" [COLOR=red]border="0"[/color]><IMG  src="images/Topofpage.gif" [COLOR=red]border="0"[/color]></a>

in both places.
 
Thank you Vragabond (and a star) for your very helpful answer. And a star for you too, BigRed1212 , for wanting to help :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top