Link decoration wont go away

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
buntrosgali
Forum Members
Forum Members
Posts: 167
Joined: Thu Apr 17, 2008 9:02 pm

Link decoration wont go away

Post by buntrosgali »

Ok guys i have created images on my site that when you roll over go from black and white to colour, i have added the text decoration code below
but the images are still showing a blue colour outline around them untill you have clicked the link once, when you have done this and return to the site the image no longer has the blue around it.


here is my site look at bottom section "who we have worked with"

link


any ideas how to remove this?
Russ
Power Poster
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: Link decoration wont go away

Post by Russ »

Basic CSS?

a:link
a:visited
a:hover, a:focus
a:active

There is no unvisited? Have you validated your CSS?
Peciura

Re: Link decoration wont go away

Post by Peciura »

symply apend stylesheet as follows

Code: Select all

a img{
   border-width:0;
}
Stom
Forum Members
Forum Members
Posts: 82
Joined: Tue Jul 31, 2007 1:41 am

Re: Link decoration wont go away

Post by Stom »

So, assuming you're just using text links, change your CSS to:

Code: Select all

<style type="text/css">
<!--
  a:link{color: #000; text-decoration: none; }
  a:visited {color: #000; text-decoration: none; }
  a:active{color: #000; text-decoration: none;
  a:hover{color: #000; text-decoration: underline; }
 }
-->
</style> 
Although this should probably go into a stylesheet, not directly in the template, just for sake of neatness.

If you're using images for links you'll need to either add a stylesheet rule:

Code: Select all

img {
  border:0;
}
Or change the few images you're using as links to have the style attribute

Code: Select all

<img src='image.jpg' style='border:0;' />
replytomk3

Re: Link decoration wont go away

Post by replytomk3 »

Web Developer Toolbar for Firefox will allow you to edit CSS live on any website and see what happens.
buntrosgali
Forum Members
Forum Members
Posts: 167
Joined: Thu Apr 17, 2008 9:02 pm

Re: Link decoration wont go away

Post by buntrosgali »

cheers guys it was a css validation error :) thanks for all your help
Post Reply

Return to “Layout and Design (CSS & HTML)”