How can I remove the lines forming around DIVs or.... anything clickable?

Discussion in 'HTML & Website Design' started by yesyoucant, Jan 10, 2011.

  1. #1
    Can someone please tell me how to get rid of the outlining white lines that are appearing when I click on certain clickable items? it looks like the Firefox Web Developer tool is highlighting them but I checked in multiple browsers... See below:

    Thanks in advance! I appreciate it.

    (top left)
    [​IMG]


    (bottom left)
    [​IMG]

    AB
     
    yesyoucant, Jan 10, 2011 IP
  2. wwwbryan

    wwwbryan Well-Known Member

    Messages:
    181
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #2
    You can't. Firefox and IE8+ does that and IE7 and below sometimes does that. Its the way the browser works and it has nothing to do with your page.
     
    wwwbryan, Jan 10, 2011 IP
  3. Dodger

    Dodger Peon

    Messages:
    1,494
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Actually you can remove them Bryan.

    Technically that is not a border, but an outline. To remove the outline is simple:

    
    a {
       outline: 0;
    }
    
    Code (markup):
    That will remove outlines for all anchor elements however.

    It would probably be best to just handle the anchors in your navigation areas only, and leave anchors in the content alone as a visual aid & accessibility for your visitors.

    
    a {
       outline: 0;
    }
    #content a {
       outline: 1px dotted #ddd; /* or whatever color you want */
    }
    
    
    Code (markup):
    For more information see W3Schools CSS outline Property page.
     
    Dodger, Jan 10, 2011 IP
  4. Raymond_M

    Raymond_M Peon

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Nice call Dodger, I didn't know about the outline property either, and had been wondering how to remove them also.
     
    Raymond_M, Jan 10, 2011 IP
  5. Dodger

    Dodger Peon

    Messages:
    1,494
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks That is one of those useless pieces of information lodged in the back of my brain that pops out every now and then.
     
    Dodger, Jan 10, 2011 IP
  6. rswebs

    rswebs Peon

    Messages:
    23
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    if you are using CSS remove no borders.
     
    rswebs, Jan 10, 2011 IP
  7. yesyoucant

    yesyoucant Member

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #7



    Dodger,

    Thanks again!! It worked like a charm. I appreciate all of your help and everyone else's too!

    Amanda
     
    yesyoucant, Jan 11, 2011 IP