Page 1 of 1

Link decoration wont go away

Posted: Wed Oct 14, 2009 11:26 am
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?

Re: Link decoration wont go away

Posted: Wed Oct 14, 2009 1:47 pm
by Russ
Basic CSS?

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

There is no unvisited? Have you validated your CSS?

Re: Link decoration wont go away

Posted: Wed Oct 14, 2009 4:04 pm
by Peciura
symply apend stylesheet as follows

Code: Select all

a img{
   border-width:0;
}

Re: Link decoration wont go away

Posted: Sun Oct 18, 2009 7:46 pm
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;' />

Re: Link decoration wont go away

Posted: Sun Oct 18, 2009 8:43 pm
by replytomk3
Web Developer Toolbar for Firefox will allow you to edit CSS live on any website and see what happens.

Re: Link decoration wont go away

Posted: Mon Oct 19, 2009 1:32 pm
by buntrosgali
cheers guys it was a css validation error :) thanks for all your help