...

View Full Version : onfocus='blur()' in style



joonstar
08-18-2005, 09:19 AM
<style type="text/css">
a:link {font-size:50px}
a:visited {font-size:50px}
</style>

<a href='1111.htm' onfocus='blur()'>1111</a>
<a href='2222.htm' onfocus='blur()'>2222</a>
<a href='3333.htm' onfocus='blur()'>3333</a>
<a href='4444.htm' onfocus='blur()'>4444</a>

The font size of the all above four links is 50px because I give it in style.
I like to remove onfocus='blur()' which is in each link but give it in style, and has the same effect.

The following trial code doesn't work correctly, but it will show what I want.

trial code

<style type="text/css">
a:link {font-size:50px; onfocus:blur}
a:visited {font-size:50px; onfocus:blur}
</style>

<a href='1111.htm'>1111</a>
<a href='2222.htm'>2222</a>
<a href='3333.htm'>3333</a>
<a href='4444.htm'>4444</a>


Can I make the trial code work with your help?

mrruben5
08-18-2005, 10:13 AM
Ehhh.. help me a bit on this, what does blur do?

I think you could use a:focus and a:hover for this to override the normal styles.

brothercake
08-18-2005, 10:37 AM
I suggest you just remove it, period. What you're doing there makes it impossible to navigate with the keyboard.

joonstar
08-18-2005, 11:10 AM
Ehhh.. help me a bit on this, what does blur do?

If you compare the result of the following code, you can see the difference between link 111 and link 222.

The difference happens when you press your mouse on the link.

<style type="text/css">
a:link {font-size:50px}
a:visited {font-size:50px}
</style>

<a href='1111.htm'>1111</a>
<a href='2222.htm' onfocus='blur()'>2222</a>

joonstar
08-18-2005, 11:12 AM
I suggest you just remove it, period.
I'm afraid I don't understand your suggetion clearly.
Do you mean that onfocus=blur() is not good?


What you're doing there makes it impossible to navigate with the keyboard.
Yes, you're right. Hm~, I think I need to consider it.

mrruben5
08-18-2005, 12:16 PM
People with diability can't see the dotted border around the link when they hover over it. I agree that that border is anoing, but it's just the way to go.

Try highlighting the link with the tab key. You don't have a hover/focus style either



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum