Hey guys a:img hover or active problem

Discussion in 'CSS' started by GreatQuality, Sep 2, 2010.

  1. #1
    Hey guys, So I have this problem with links - then I click on them a dotted border show all around links and images what are linked..
    I really hate it, I saw some sites that somehow disables this. If you now what is the problem please replay. ;)
     
    GreatQuality, Sep 2, 2010 IP
  2. Rimona

    Rimona Active Member

    Messages:
    123
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    63
    #2
    You are asking us to answer a question very similar to:

    Please post either code or link
    Best if you do both!
     
    Rimona, Sep 2, 2010 IP
  3. GreatQuality

    GreatQuality Peon

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Sorry but I can't post a link because I am working on localhost now.
    But I can give you example of what I want easily. Just look here. Just try to click on left side menu iteams like "JS Introduction" "JS How To". Then you click on the link a dotted border comes up all around the link that you clicked.
    But in this site - here -, border never apears! I can click on any link if you want.
    So I want to hidden this border.
    I tried:
    But that have not work...
     
    GreatQuality, Sep 2, 2010 IP
  4. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #4
    
    a {text-decoration:none;}
    a:hover, a:focus {text-decoration:none;}
    a:visited {text-decoration:none;}
    a:active {text-decoration:none;}
    
    Code (markup):
    Now all underlining stuff is disabled. Learn to use google and learn some basic CSS.

    I would use something like this:

    
    a {text-decoration:none;color:#000;}
    a:hover, a:focus {color:#f06020;}
    a:visited {color:#000;}
    a:active {color:#a01010;}
    
    Code (markup):
    I think if you define text-decoration:none in the a tag you do not repeat it in :hover, focus, visited and active.
    Look at http://xhtml-valid-websites.com/demos/full-size-background-with-jquery-navigation/ at the bottom left.
    That's done with CSS3... you gotta learn it.

    Ow, img is nearly the same... happy reading
     
    Last edited: Sep 2, 2010
    CSM, Sep 2, 2010 IP
  5. Piotr Aszoff

    Piotr Aszoff Active Member

    Messages:
    38
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    53
    #5
    Hi,
    use outline:none and that's it.

    Hope it helps, Peter
     
    Piotr Aszoff, Sep 2, 2010 IP
  6. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #6
    Hm really?

    I use outline:none; not really very often... and I never have any problems with a tags.
    So I presume outline:none is none as default or your solution is not right.

    It is about the A tag and not about the IMAGE tag.
     
    CSM, Sep 2, 2010 IP
  7. Piotr Aszoff

    Piotr Aszoff Active Member

    Messages:
    38
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    53
    #7
    I mean A tag as well. It works fine. I've even checked it before I wrote anything. There is no dotted border around links (when you are clicking it - basically it lasts for a very short time but i don't like it as well).
     
    Piotr Aszoff, Sep 3, 2010 IP
  8. Piotr Aszoff

    Piotr Aszoff Active Member

    Messages:
    38
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    53
    #8
    Here are some images about it.

    Without outline:
    noOutline.jpg

    With outline:
    withOutline.jpg

    Just one line of code.
    a{
    outline:none;}
    Code (markup):
    Hope it helps, Peter
     
    Piotr Aszoff, Sep 3, 2010 IP
  9. Piotr Aszoff

    Piotr Aszoff Active Member

    Messages:
    38
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    53
    #9
    One more thing.
    Here you have an image link as well and its without outline.

    imageoutline.jpg

    You can see the dotted border as well.
    After using outline:none for A tag its gone.

    Hope it helps, Peter
     
    Piotr Aszoff, Sep 3, 2010 IP
  10. Piotr Aszoff

    Piotr Aszoff Active Member

    Messages:
    38
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    53
    #10
    And do not get me wrong. Writing without outline i was saying: without using this line of code.
     
    Piotr Aszoff, Sep 3, 2010 IP