Turn your Mobile Apps into m-commerce apps – Learn More!

You're Browsing As A Guest! Register Now...
Become an Expert!

Join 415,726 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,718 people online right now.Registration is fast and FREE... Join Now!



Removing annoying dotted lines on links They drive me nuts and make the page look bad.

#1 BenignDesign  Icon User is offline

  • Baby Momma
  • Icon

Reputation: 217
  • View blog
  • Posts: 4,038
  • Joined: 28-September 07


Dream Kudos: 150

Expert In: sporks

Share |

Removing annoying dotted lines on links

Posted 12 April 2008 - 07:47 AM

Here's my issue this time:

I'm using images for some links. I've got the whole border:0px; bit in my CSS. The problem is browsers tend to put a black dotted border around the images when they are active.

I've tried several tips/tricks I pulled up on a google search, but to no avail.

Anyone have a fail-proof method of getting rid of these annoying little lines?

Attached Image

Many thanks!
Was This Post Helpful? 0
  • +
  • -


#2 BenignDesign  Icon User is offline

  • Baby Momma
  • Icon

Reputation: 217
  • View blog
  • Posts: 4,038
  • Joined: 28-September 07


Dream Kudos: 150

Expert In: sporks

Re: Removing annoying dotted lines on links

Posted 12 April 2008 - 07:56 AM

heh... nevermind. If I had put what few brain cells I have to use, I could have figured it out sooner. Thanks for staring at my typing though... I got it figured out. :w00t:
Was This Post Helpful? 0
  • +
  • -

#3 Martyr2  Icon User is online

  • Programming Theoretician
  • Icon

Reputation: 1435
  • View blog
  • Posts: 8,316
  • Joined: 18-April 07


Dream Kudos: 0

Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

Re: Removing annoying dotted lines on links

Posted 12 April 2008 - 08:02 AM

I may know the solution, but can you just post your fix here for others to see in the future? Thanks.
Was This Post Helpful? 0
  • +
  • -

#4 BenignDesign  Icon User is offline

  • Baby Momma
  • Icon

Reputation: 217
  • View blog
  • Posts: 4,038
  • Joined: 28-September 07


Dream Kudos: 150

Expert In: sporks

Re: Removing annoying dotted lines on links

Posted 12 April 2008 - 08:17 AM

The solution I came up with is a class in CSS, like this:

a.toolbar:link {outline:none;}
a.toolbar:active {outline:none;}
a.toolbar:visited {outline:none;}
a.toolbar:hover {outline:none;}



In your HTML, you do this for your link:

<a class="toolbar" href="#"><img src="test_img.png" /></a>



I used this with text links and it works that way too! Yay! I'm not having a moron day!
Was This Post Helpful? 0
  • +
  • -

#5 Martyr2  Icon User is online

  • Programming Theoretician
  • Icon

Reputation: 1435
  • View blog
  • Posts: 8,316
  • Joined: 18-April 07


Dream Kudos: 0

Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

Re: Removing annoying dotted lines on links

Posted 12 April 2008 - 08:59 AM

That is what I had thought but I was going to suggest just doing it for all link tags...

a {
	 outline: none;
}



Thanks for posting the solution. I am sure others can learn from it in the future. :)
Was This Post Helpful? 0
  • +
  • -

#6 BenignDesign  Icon User is offline

  • Baby Momma
  • Icon

Reputation: 217
  • View blog
  • Posts: 4,038
  • Joined: 28-September 07


Dream Kudos: 150

Expert In: sporks

Re: Removing annoying dotted lines on links

Posted 12 April 2008 - 09:06 AM

Your solution was one I pulled off google and it didn't work for me. Most likely a conflict with some other code on the page (such as 8 different link classes).... just an inkling :P
Was This Post Helpful? 0
  • +
  • -



Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users