Get rid of dotted border from links

November 22, 2007 • 132 comments

We’ve all seen how Firefox will add a dotted border on any links are clicked. When coupled with the Phark technique, Firefox extends that dotted border to include your extremely indented text. However there are three different solutions to this:

  1. Getting rid of the dotted border completely
  2. Stopping the border from stretching
  3. Editing the Firefox default user style sheet to do solution 1 or two for all websites you visit

The first solution will essentially turn of the border completely leaving no outline

a {
    outline: none;

long dotted border around image

no dotted outline on image

The second solution will keep the border nice and tidy with your image.

a {
    overflow: hidden;

long dotted border around image

Tidy dotted outline border

Lastly if you’re annoyed by the border as much as I am, there are two ways to perform either one of these solutions using the Firefox user style sheet.

But we’ll save that for the next entry.

Tags: , , ,

132 Responses to “Get rid of dotted border from links”

  1. December 7th, 2007 8:05 pm chocolaterain dude who sits next to you in JRs class :)

    stumbled upon again! how come I never stumbleupon my blog?!

  2. December 8th, 2007 2:50 am Swany

    wow, I’m so freaking excited… this is exactly what I was looking for a week ago.. i was stumbling, stumbling, stumbling and got distracted…I just landed on your page tonight… so thank you!


  3. December 8th, 2007 4:16 am anna

    Indeed, the border is ugly. But with no border, people who go to links on pages using the tab key, now see nothing.

  4. December 8th, 2007 11:49 am Zaki


    Thats why you use method 2, or put an a:active or a:focus state on the image. That way a keyboard user will see a change on the links when using IE or Firefox.

    Thanks for your comments.

  5. December 9th, 2007 12:32 pm Arjan

    Be careful with removing the outline. For accessibility reasons these outlines are used, for example if you use tab when you browse by keyboard.

    A solution to make clear what link is active, you can apply a style to it by using the :focus state (like :hover).

  6. December 10th, 2007 2:37 am chocolaterain dude who sits next to you in JRs class :)

    Close to 8000 visits and yet only 6 comments, and two are mine… lame… :)
    just kidding man, that’s awesome. What’s the next blog gonna be about?

  7. December 10th, 2007 8:33 am Zaki

    Arjan, as I mentioned in the comments in this posting, when using -9999px for image replacement, the outline extends to the left to contain the entire element, however instead of doing outline:none you can do overflow:hidden and have the outline not extend all the way to the left. Also with a clear a:focus and a:active defined you can use outline:none and not have any accessibility issues. It is up to the developer to utilize all techniques together to create a well designed and easily accessible website.

  8. December 10th, 2007 11:12 am Arjan

    Sure you can disable the outline by using :active. But I meant applying a whole new style for the active state. You can, for example, use an background image with a kind of glow to highlight the usage of a tab. Of course there are way more creative solutions.

    What I forgot in my previous comment, is mentioning that using text-indent itself can be harmful. If the visitor has turned images off, there will be nothing to display. (Of course I know that not many people have CSS turned on, but images off… I just mention it.)

  9. December 10th, 2007 2:59 pm Edward Turtle

    Ahhh thanks, that’s a great help, cheers

  10. December 11th, 2007 10:51 am LouCypher

    *|*:-moz-any-link:focus {
    outline-width: 0 !important;

  11. December 12th, 2007 6:08 pm Tony Landis

    Great tip, thanks

  12. December 12th, 2007 10:40 pm XGhozt

    Wow, this is great! I didn’t even realize that was possible. I just assumed it was a firefox feature or something. I’m going to take advantage of this one!


  13. January 22nd, 2008 8:13 pm Joe

    Urm…am I the only one this doesn’t work for?

    I haven’t got dashed borders happening to my links in firefox but instead Ive got single blue outlines appearing around my links and I applied the first technique shown and its still stayed the same.

    Any ideas?

  14. January 22nd, 2008 8:21 pm Joe

    Hey no worries, I found it somewhere else, just add into your html bit

    coolio hoolio ;)

  15. January 22nd, 2008 8:22 pm Joe

    didnt come out but…. border=”0″ after your image src bit of html

  16. March 2nd, 2008 7:02 pm Arencykneedly

    Hello there.
    Just found your site. Great job!
    I like it much.
    look here

  17. June 2nd, 2008 8:06 pm james

    this post rules! I was about to just give up. Thanks!

  18. July 30th, 2008 4:00 pm Jane

    works perfectly, thanks for the big help

  19. August 9th, 2008 7:20 pm Alex Grogan

    I’m still laughing about whoever said, “people who go to links on pages using the tab key, ”

    I mean – WHO browses a page like that?

    Use a mouse.

  20. August 9th, 2008 11:34 pm Zaki

    People with disabilites such as low mobility. Thanks for dropping by.

  21. December 21st, 2008 9:35 am Geoserv


    Excellent tip, will definitely use this.

  22. January 24th, 2009 3:35 am olek

    if you lost all hope try this in your linked css file:

    outline: none;
    border: none;

    a:link img{
    outline: none;
    border: none;

    a:visited img{
    outline: none;
    border: none;

    a:hover img{
    outline: none;
    border: none;

    a:active img{
    outline: none;
    border: none;

    a:focus img{
    outline: none;
    border: none;

  23. January 26th, 2009 2:51 am Kate

    Thanks a lot! I’ve been looking for this everywhere :D

  24. January 26th, 2009 1:41 pm Jeroen

    Thanks man! Looking all over the web. Great solution, really simple!

  25. February 21st, 2009 1:55 pm Sam

    thanks so much, this is great!

  26. March 17th, 2009 12:41 pm steve

    that code posted by olek did just the trick for me, so many thanks!!! I’ll go back through the other sites ive made and put those changes to them too. I just hated giving them to clients and hoping that they would view their site in IE…

  27. April 16th, 2009 12:42 am JAB_au

    Excellent tip there, used it on my blog so you get a stumble thumb up.

  28. April 27th, 2009 7:16 pm Top CSS tutorials | FAQPAL Blog

    [...] Get rid of dotted border from links [...]

  29. May 28th, 2009 12:53 am Corey

    I already knew how to do this, but I just had to comment on how beautiful your site is. Amazing choice of colors.

    Sorry to go off topic for a moment.

  30. June 12th, 2009 1:45 am aloy

    Very useful, thank you! I was already wondering how o get rid of those ugly outlines…

  31. September 14th, 2009 4:27 pm Sean

    Thanks for posting this. I found it quite useful. I read alot about Accessibility in the comments. Are there any decent 508 compliance validators that actually work?

  32. September 25th, 2009 9:08 am nos4a2

    Thx for the info,

    however , new to the CSS style.. no idea where and how to place this code…I have so far jsut created a simple website in photoshop/ dreamweaverCS3 and am looking at a way to remove the annoying border.

  33. October 11th, 2009 2:30 am Hugo

    Thank you.
    I was trying to find out the answer to this by trial and error in my css.
    I then did my first search on google for this problem.
    This was my search: ‘get rid of dotted border on active link’
    Your blog site here is ace

  34. October 22nd, 2009 2:04 pm Gangster76

    CommentsThis is awesome, Deb! ,

  35. December 8th, 2009 8:27 am tom

    Thanks you saved the day! Thumbs up! On stumbleupon and the real world!

  36. May 22nd, 2010 6:49 pm ProExtend

    Wow this fixed the issue regarding the display of those pesky borders. Now my question is how do I make the space between the 2 link images smaller or lessen it. I cant figure out a way to make the images get closer. They still have a spacing between them as if the dotted border were still active.

    I know this topic is a bit old but really helpful and I appreciate any help u can provide.

  37. [...] If you need visually selected focused elements, do not rely on browsers’ implementation. Just get rid of the active border and use your own highlighting [...]

  38. June 10th, 2010 4:25 pm ray

    rock on.
    tooo easy to think it out myself ;)

  39. October 30th, 2010 5:30 pm Steve

    OLEK rules.. that is his rules rule.. they fixed big problem with ugly images for us.. many thanks

  40. December 7th, 2010 8:44 pm sadf

    awesome thanks buddy! so simple, so elusive…

  41. January 29th, 2011 4:18 pm Kakar


  42. February 16th, 2011 2:47 am Alen

    Cool solution. Thnx.

  43. March 3rd, 2011 2:03 pm Hank

    Great post! the most import thing I learned from trial and error is that the outline stype needs to be assigned to BOTH the a tag and the img tag…

  44. April 6th, 2011 10:03 am ailyl rozanna

    thank you so much!

  45. September 28th, 2011 10:22 am Randolph Williams

    This is just what I was looking for! I forgot about the outline property. I’m so used to using my all-encompassing reset style sheet, that I never have to set the outline property anymore.

    This simple little post is still a big help after all this time. Still relevant.


  46. October 11th, 2011 10:19 pm Claudia

    Just what I was looking for! Thanks a lot.

  47. January 24th, 2012 4:40 pm kangablu

    Great – that really helped me. Many thanks

  48. July 14th, 2012 3:58 am volunteer site helper

    Thank you very much.

    I have been upgrading a site and found that firefox puts dotted lines around all links including dotted lines around image links without asking. Click a new page, no problem. Click to go back and there is the dashed line around a link. Not good. You solved this.

    Thank you.

    I have worked through a lot of IE6 compatibility issues and tried to comment what I found. If you look at the web page source you can copy the css for your own use.

    Again. Thank you.

  49. December 3rd, 2012 1:00 pm Fer

    Whoa! thx u resolved my life

  50. February 15th, 2014 12:40 am culinary institute of america

    The writing flavor has become astonished me. Many thanks, really amazing write-up.

  51. November 2nd, 2014 10:46 pm

    Get rid of dotted border from links | WYSIWIP

  52. August 7th, 2017 5:49 pm

    I pay a visit every day a few blogs and information sites to read
    posts, but this web site offers feature
    based content.

  53. August 9th, 2017 1:00 pm Temeka

    Hi it’s me, I am also visiting this web page regularly,
    this web site is in fact good and the visitors are truly sharing pleasant thoughts.

  54. August 9th, 2017 4:49 pm

    That is a great tip especially to those fresh to the blogosphere.
    Short but very precise information… Thank you for sharing this one.

    A must read article!

  55. August 9th, 2017 8:52 pm Adele

    Thanks for every other wonderful post. Where else may just anyone get that type
    of information in such a perfect way of writing?
    I’ve a presentation subsequent week, and I am on the search
    for such information.

  56. August 12th, 2017 9:00 am

    No matter if some one searches for his required thing, therefore
    he/she desires to be available that in detail,
    so that thing is maintained over here.

  57. August 13th, 2017 3:51 am olej z konopi indyjskich cena

    At this time I am ready to do my breakfast, later than having my breakfast coming yet again to
    read further news.

  58. August 13th, 2017 7:39 pm olej cbd zastosowanie

    I love what you guys are up too. This kind of clever work and coverage!
    Keep up the terrific works guys I’ve you guys to our blogroll.

  59. August 13th, 2017 9:30 pm medyczna marihuana sklep

    Hello, after reading this awesome article i am
    also glad to share my know-how here with mates.

  60. August 14th, 2017 4:19 am best wishes greetings messages

    I am really enjoying the theme/design of your blog.

    Do you ever run into any browser compatibility problems?
    A couple of my blog readers have complained about my site not operating correctly in Explorer but
    looks great in Opera. Do you have any recommendations
    to help fix this issue?

  61. August 15th, 2017 2:18 am Birthday Whises

    Just desire to say your article is as astonishing. The clarity
    in your put up is just excellent and that i could suppose
    you’re knowledgeable in this subject. Fine together with your permission allow me to
    grab your RSS feed to keep up to date with drawing
    close post. Thanks 1,000,000 and please keep up the gratifying work.

  62. August 15th, 2017 2:47 am olej cbd zastosowanie

    I believe everything posted made a ton of sense.
    However, think about this, suppose you were to write a
    awesome post title? I am not saying your information is not good,
    however suppose you added something to maybe grab folk’s attention? I
    mean Get rid of dotted border from links | WYSIWIP
    is a little boring. You should peek at Yahoo’s front page and note how
    they create news titles to get people to click.
    You might add a video or a pic or two to grab people excited about what you’ve got to say.
    In my opinion, it might bring your posts a little livelier.

  63. August 15th, 2017 3:45 pm olej z konopii indyjskich

    If you desire to improve your familiarity just keep visiting
    this web page and be updated with the newest news posted here.

  64. August 19th, 2017 11:07 pm cibdol

    You could certainly see your enthusiasm in the article you write.
    The arena hopes for even more passionate writers like you who aren’t afraid to say how they believe.
    Always go after your heart.

  65. August 20th, 2017 4:42 pm olej konopi

    I do believe all of the ideas you have introduced
    to your post. They are very convincing and
    can certainly work. Nonetheless, the posts are too short for novices.
    May just you please lengthen them a little from subsequent time?

    Thank you for the post.

  66. August 28th, 2017 8:12 pm Cameron

    Thanks for a marvelous posting! I seriously enjoyed
    reading it, you will be a great author.I will make certain to
    bookmark your blog and will eventually come back down the road.
    I want to encourage that you continue your great job, have a nice

  67. August 30th, 2017 6:32 am Carmine

    There’s certainly a lot to find out about this topic.
    I really like all of the points you have made.

  68. August 30th, 2017 3:15 pm Business Directory Script

    I needed to put you that very little remark in order to give thanks yet again for the spectacular solutions you’ve discussed above. It was unbelievably open-handed with people like you to present freely all that a lot of folks would’ve offered for an ebook to help make some cash for their own end, particularly since you might well have done it if you ever desired. The tips in addition worked to be the great way to fully grasp that other people online have a similar dreams really like my personal own to know the truth many more with reference to this problem. I’m certain there are numerous more enjoyable occasions ahead for individuals that browse through your site.

  69. September 13th, 2017 4:03 pm cbd pure hemp oil scam

    The very greatest trader of all situations Jesse Lauriston Livermore
    performed poker. We can Learn about this fact from “Reminiscences of the Stock Operator” by Edwin Lefevre.
    Richard Smitten is just another renowned author who wrote about Livermore.
    Both authors composed that Jesse Lauriston Livermore enjoyed to play poker together with
    his pals. And then he played with poker well.

  70. October 16th, 2017 12:29 am fake van cleef mini bracelet

    I am regular reader, how are you everybody? This post posted at this site is genuinely good.
    fake van cleef mini bracelet

  71. November 7th, 2018 5:40 pm Blanka Lipinska Ten Dzien ebook

    Thanks for the marvelous posting! I really enjoyed reading it, you may be a great author.
    I will make certain to bookmark your blog and may come back sometime soon. I want to
    encourage you to definitely continue your great job, have a
    nice morning!

  72. December 26th, 2018 1:55 pm all pc games download

    Buy the latest PC games, hardware and accessories at GameStop. Shop for … Forza Horizon 4 Ultimate Edition. $99.99

  73. December 27th, 2018 4:12 pm kons menejerlik

    Thank you for sharing. Come back our website.

  74. January 1st, 2019 11:37 am computer gamepad

    Download GTA Vice City 2002 PC game free setup. We have best source of downloading, installing and playing any pc video game with

  75. January 1st, 2019 12:06 pm reddit

    very well written..

  76. January 4th, 2019 8:08 am antep escort

    Gaziantep ilinin en kaliteli ve güncel Escort Bayan ilanlarını ve numaralarını Antep Escort sitemizde bulabilirsiniz.

  77. January 5th, 2019 12:12 pm click here

    Great writeup from a great blog.

  78. January 5th, 2019 1:09 pm gamepad controller for pc

    GOG is a game distribution platform like Steam, but all of its games are DRM-free—your games aren’t linked to your GOG account, so even if GOG shuts down, …

  79. January 5th, 2019 4:23 pm izmir kons iş ilanları

    Thank you for sharing. Come back our website.

  80. January 7th, 2019 5:18 am Mel Klingen

    Whats up this is somewhat of off topic but I was wanting to know if blogs use WYSIWYG editors or if you have to manually code with HTML. I’m starting a blog soon but have no coding experience so I wanted to get advice from someone with experience. Any help would be enormously appreciated!|

  81. January 8th, 2019 2:23 am erase my back pain complaints

    I visit everyday a few blogs and websites to read content, except this website gives quality based writing.|

  82. January 10th, 2019 7:58 am Sang Winnicki

    i like your article.

  83. January 10th, 2019 3:33 pm Zack Fechter

    great job. thank you for the article

  84. January 11th, 2019 11:46 am

    Awesome! Its truly amazing post, I have got much clear idea on the topic
    of from this post.

  85. January 11th, 2019 6:21 pm gazino iş ilanları

    Thank you for sharing. Come back our website.

  86. January 15th, 2019 3:18 pm gazino kons bayan iş ilanları

    Thank you for sharing. Come back our website.

  87. This is our prime four best warmth press machine picks.

  88. January 23rd, 2019 1:10 pm Administratiekantoor

    Nice post! Keep up the good work!

  89. January 25th, 2019 7:15 am Game Poker Online Terbaik

    Interesting wonderful putting up! I must say i enjoyed looking at the idea, you will be a great writer.I am going to ensure that Get rid of dotted border from links | WYSIWIP My spouse and i take a note of your blog and could revisit in the future. I wish to motivate you continue your excellent producing, use a great night!. Game Poker Online Terbaik

  90. January 30th, 2019 10:02 am bursa child escort

    Bursa ekot site yöneticisi Hasan gül

  91. February 4th, 2019 5:55 am Schoonheidssalon

    Looks realy great! Thanks for the post.

  92. February 14th, 2019 4:57 am parquet
  93. February 20th, 2019 12:28 am cocuk pornosu

    sapık çocuk pornosu

  94. February 21st, 2019 1:51 am apple haberleri

    The memory we used to share is no longer coherent.

  95. February 27th, 2019 3:28 am Rodolfo Kalista

    I appreciate the time you put into this post. In fact your writing has me wanting to kickoff my own webblog now. Thanks again for sharing this up.

  96. March 12th, 2019 10:26 am

    Hello, i believe that i saw you visited my weblog so i got here to go back the prefer?.I’m trying to to find issues to enhance my website!I guess its ok to use some of your ideas!!

  97. March 14th, 2019 2:46 am toptan meyve

    Hi Bro, Thank you very much for your writing and your article and I wish you continued success. Please try to produce such valuable content in the following processes. In addition to this article, I am very happy to see your unique content.

  98. March 29th, 2019 10:45 am

    ブランド コピー 激安 通販 ドレス多様なスタイル 最安値100%新品2014100%新品.エルメス 財布 スーパーコピー,エルメスバッグコピー日本最大海外通販

  99. April 9th, 2019 8:05 pm Garth

    Most of the files in the WordPress theme I have end in .php. I would like to be able to make the text changes on screen in the WordPress theme, also, how do you add additional pages, etc?.

  100. April 11th, 2019 7:11 pm Mitch

    Where can I find blogging websites that deal with legal issues?

  101. April 14th, 2019 7:38 am Onzuiverheden verwijderen

    Thanks for this nice post. …

  102. April 27th, 2019 8:03 am halki diabetes remedy download

    Hi there to all, the contents present at this web site are genuinely awesome for people experience, well, keep up the nice work fellows.|

  103. May 5th, 2019 2:10 pm jletli tel adana

    thank you for sharing. Come back our website

  104. May 5th, 2019 4:36 pm Wilson Briel

    With every thing which appears to be building throughout this area, a significant percentage of perspectives are generally somewhat exciting. However, I beg your pardon, but I do not give credence to your whole theory, all be it exciting none the less. It would seem to me that your comments are generally not totally validated and in simple fact you are generally yourself not even fully convinced of the assertion. In any event I did appreciate looking at it.

  105. May 6th, 2019 10:12 am target women's clothing brands

    Accurately wanna enter on several overall aspects, The net layout is fantastic, the content material is very exceptional : D.

  106. May 8th, 2019 4:14 pm amcıkseni

    e escort

  107. May 27th, 2019 4:15 pm Dann Revord

    I’d need to verify with you here. Which is not something I normally do! I get pleasure from reading a post that may make folks think. Also, thanks for allowing me to remark!

  108. May 27th, 2019 4:38 pm Prince Strothman

    Almost all of what you claim happens to be astonishingly precise and it makes me wonder why I hadn’t looked at this with this light previously. Your piece really did switch the light on for me personally as far as this topic goes. But at this time there is actually 1 position I am not really too comfortable with and whilst I attempt to reconcile that with the actual central theme of your point, let me observe what all the rest of the visitors have to say.Well done.

  109. May 31st, 2019 9:34 am Yangın Kapısı

    Yangın Kapısı istanbul veya diğer şehirlerde önem arz eden bir kapıdır. Teme amacı En kısa sürede Çıkış Yapmayı sağlamöaktır. Ucuz Yangın MErdiveni Kapısı ve Yangın Çıkış Kapısı, Yangın Çıkış kapısı Panik Barlı Kapıdır.

  110. June 11th, 2019 10:20 am Eli Ghazal
  111. June 15th, 2019 9:23 am götünü sikecek

    cocuk porno videolarını sıtede ızleyın

  112. July 4th, 2019 1:56 pm Milagro Hemler
  113. July 6th, 2019 10:23 am Jeraldine Renkes
  114. July 6th, 2019 1:59 pm Rosann Blocker
  115. July 8th, 2019 8:24 am Sean Minaya
  116. July 8th, 2019 12:55 pm Dominic Rownd
  117. July 11th, 2019 10:51 am Natosha Friedrichs
  118. July 12th, 2019 1:52 pm Myrtice Rippe
  119. July 13th, 2019 12:49 pm Laine Pflug
  120. July 17th, 2019 6:10 am Carol Papitto
  121. July 25th, 2019 5:15 am Waved

    Секс знакомства с видео чатом онлайн.

  122. July 28th, 2019 6:01 am

    There’s definately a lot to learn about this subject.
    I love all of the points you have made.

  123. July 30th, 2019 8:47 am kohls 30% off

    Thanks for another great article. Where else may anybody get that kind of information in such an ideal means of writing?
    I have a presentation subsequent week, and I am on the
    look for such info.

  124. August 13th, 2019 12:10 pm Kathlyn Castrogiovann

    That is a really good tip particularly to those new to the blogosphere. Short but very precise info… Thanks for sharing this one. A must read article!|

  125. August 14th, 2019 5:35 am Click here

    Buy it now.

  126. August 19th, 2019 5:08 am Kablosuz Güvenlik Sistemi

    thank you for sharing. Come back our website. SEO Show

  127. August 20th, 2019 11:13 pm Anonymous
  128. September 3rd, 2019 2:47 am Isıcam Fiyatları

    thank you for sharing. Come back our website. SEO Show

  129. September 7th, 2019 2:56 am Brawe Rewards

    seem to bee running off the screen in Internet explorer.I’m nnot sure iff thiss is a format issue or something to do with web broser compatibility but I thought I’d post tto let you know. The style and design ook great though! Hope you get the issue solved soon.

  130. September 9th, 2019 4:45 am İş Hukuku Avukatları

    thank you for sharing. Come back our website. SEO Show

  131. September 12th, 2019 3:45 am Ombre Nedir

    thank you for sharing. Come back our website. SEO Show

  132. September 20th, 2019 12:52 pm Dane Engles

    I’m amazed, I have to admit. Seldom do I come across a blog that’s both educative and amusing, and let me tell you, you’ve hit the nail on the head. The issue is something that too few people are speaking intelligently about. Now i’m very happy I stumbled across this in my hunt for something concerning this.

Your 2 cents: