Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts

    onfocus='blur()' in style

    Code:
    <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.
    Code:
    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?
    Get my greedy up

  • #2
    Regular Coder
    Join Date
    Nov 2004
    Location
    The Netherlands
    Posts
    551
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    CATdude about IE6: "All your box-model are belong to us"

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I suggest you just remove it, period. What you're doing there makes it impossible to navigate with the keyboard.
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #4
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by mrruben5
    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.
    Code:
    <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>
    Last edited by joonstar; 08-18-2005 at 11:58 AM.
    Get my greedy up

  • #5
    Regular Coder
    Join Date
    Apr 2003
    Location
    Seoul, Korea
    Posts
    329
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by brothercake
    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?

    Quote Originally Posted by brothercake
    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.
    Last edited by joonstar; 08-18-2005 at 11:57 AM.
    Get my greedy up

  • #6
    Regular Coder
    Join Date
    Nov 2004
    Location
    The Netherlands
    Posts
    551
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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
    CATdude about IE6: "All your box-model are belong to us"


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •