0

I have this link:

<a href="/" style="position: absolute; left: 40px; top: 50px; height: 60px; width: 120px;"> </a>

Which works fine in most browsers, except for IE. I tested it in IE8.

When I add a background color, it does work however. But this is not possible on my design. How do I fix this link to be clickable?

<a href="/" style="background-color: red; position: absolute; left: 40px; top: 50px; height: 60px; width: 120px;"> </a>

edit: I also tested with transparant background, doesn't work either.

Rene Pot
  • 24,681
  • 7
  • 68
  • 92

3 Answers3

2

to avoid your mouse to click through your link, you understood you needed a background-color since there's no content at all.
background:rgba(0,0,0,0.01); just does fine, it has a background and still you don't see it.

In fact your link is like it doesn't exist, no text, no title , no nothing but CSS.
Easter egg :) ?

Unless you have really good reason, it is not a good practice to have such an inconsistant link .

Actually, In a real IE8 (win XP) your empty link is clikable ! http://liveweave.com/XvhkJ6 made and tested from a genuine IE8. :)

G-Cyrillus
  • 101,410
  • 14
  • 105
  • 129
0

Add a transparent gif on a background. It is a known bug in IE.

claustrofob
  • 5,448
  • 2
  • 19
  • 22
-2

You can use background-color: none

Zero Fiber
  • 4,417
  • 2
  • 23
  • 34