Results 1 to 9 of 9

Thread: Remove Dotted Line

  1. #1
    Join Date
    Nov 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Remove Dotted Line

    1) Script Title:
    Tab Content Script
    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tabcontent.htm

    3) Describe problem:
    When you click on a tab, a small dotted line surrounds the image of the tab. I was wondering how you get rid of this line. Is there some kind of script I can put in .js or .css file? If so can someone tell me?

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Try the below, which Brian (a DD surfer) emailed me to say as far as what he does to remove the dotted line:

    "To get rid of the ugly focus rectangle when you click on any of the tabs, you can add 'onFocus="this.blur();" ' inside each of the <li> items like so:"

    Code:
    <li><a href="#" onFocus="this.blur();" rel="tcontent2">Tab 2</a></li>
    "I've tested this on both IE6 and FF1.5.0.7 myself and it works perfectly."

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Ugh. This totally breaks keyboard navigation.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey View Post
    Ugh. This totally breaks keyboard navigation.
    Exactly my thoughts. How much control does the designer need at the expense of functionality?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    And personally, I actually like the dotted lines, especially as a feature in general.

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I don't, I think they're hideous There are much nicer ways that could be used to show focus nowadays; they're just left over from less advanced times (much like the horrible default blue-red-purple colour scheme for links). However, this is not the way to hide them.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    But when you have a list of plain text links on the page and you need to go through each one sequentially, that's when I really appreciate the dotted line feature.

  8. #8
    Join Date
    Nov 2006
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    a{outline-style:none}

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    But the whole point of this thread is to find a way to remove the 'ugly' outline without compromising the functionality of keyboard navigation.

    With tab content, you can do something like so:

    Code:
    .shadetabs li a:focus {
    outline:none;
    color:darkcyan!important;
    }
    This will allow (in FF) the text of the tab to be highlighted in a color for navigation but, without the ugly dotted box. Other links will not be affected. IE will not respect this but, it won't cause the outlines in the first place unless keyboard navigation is initiated by the user. Opera appears not to use this for tab content to begin with.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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