Web Design Forum: Dots around clicked Image Link - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Dots around clicked Image Link

#1 User is offline   darkrats 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 03-February 12
  • Reputation: 0

Posted 03 February 2012 - 04:33 PM

Hi everyone.

I have a really simple webpage with only one image. You click on it to send an email. As you all probably know, when you click on an Image Link it usually leaves a dotted line around the image, to show it's been clicked. I found the small piece of code that removes the dotted line, and added to my code. It works in IE but the dotted line is still visible in FF. My code (that works in IE) is below. I'm pretty much an amateur when it comes to web design. At times I know what I'm doing and the rest of the time it's trial and error. Can anyone see how to alter the code so it works with both IE and FF? Thanks.
----------------------------------------------------------
<p align="center">
<a href="mailto:someone@mail.ca" [b]a { outline:0;[/b] }>
<img border="0" src="symbol.png" width="53" height="50"></a></td>

-----------------------------------------------------------

This post has been edited by Renaissance-Design: 03 February 2012 - 04:40 PM
Reason for edit: Please use the code button or tags to format your code.

0

#2 User is online   Renaissance-Design 

  • Available for custom WordPress work
  • View blog
  • Group: Moderators
  • Posts: 3,592
  • Joined: 12-August 10
  • Reputation: 559
  • Gender:Male
  • Location:South Wales
  • Experience:Web Guru
  • Area of Expertise:Designer/Coder

Posted 03 February 2012 - 04:41 PM

That CSS shouldn't be floating there in the middle of your <a> element.
0

#3 User is online   Bomb 

  • Expert
  • PipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 694
  • Joined: 09-October 10
  • Reputation: 88
  • Gender:Male
  • Location:Cheshire, UK
  • Experience:Advanced
  • Area of Expertise:Designer

Posted 03 February 2012 - 05:20 PM

Add...

a img { border: none; }


to your css file.
0

#4 User is online   BlueDreamer 

  • Web Guru
  • Group: Moderators
  • Posts: 5,804
  • Joined: 23-October 07
  • Reputation: 202
  • Gender:Male
  • Location:Northampton (where?)
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 03 February 2012 - 07:06 PM

Noooooooooo! http://www.outlinenone.com
0

#5 User is offline   Wickham 

  • Web Guru
  • View gallery
  • Group: Moderators
  • Posts: 2,876
  • Joined: 11-June 09
  • Reputation: 257
  • Gender:Male
  • Location:Salisbury UK
  • Experience:Intermediate
  • Area of Expertise:Web Developer

Posted 03 February 2012 - 07:20 PM

The link above says "Don't do it" and then says "If you must remove it, provide alternative styling".

I find that sometimes the dotted outline is hardly visible, especially around a small image link where a bright color of the image seems to make a dotted outline hard to see.

I tend to make outline: none; and then add several focus styles that are very different from other link states, perhaps an underline if the others haven't got underline and a very different color or background or a very different image for the focus style.

I think I'm right that IE7 doesn't support focus or outline as it uses the active state where other browsers use focus, so that's why your code probably works for IE7 but IE8/9 do support outline so outline:none can be used for IE8/9 provided you code focus as an alternative.

This post has been edited by Wickham: 03 February 2012 - 07:29 PM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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