Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Dotted line around tab

  1. #1
    Join Date
    Mar 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Dotted line around tab

    1) Script Title: Tabbed Document Viewer

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...bdocviewer.htm

    3) Describe problem: The whole script works fine (thank you) but when I klick a tab it shows a dotted line around the tab about 1 mm displaced. Did you hear about the problem before? I use intern links to move from one tabbed page to the other. I checked it with IE6 and 7.

    Thanks.

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    I believe you are referring to the outline:
    http://www.w3schools.com/CSS/pr_outline-style.asp

    Try adding this to your CSS code:
    Code:
    a { 
    outline-style: none;
    }
    However, I would not recommend this since the outline is important for people that browse using tabs.

    Good luck!

  3. #3
    Join Date
    Mar 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for your help.
    I prefer to send the image below to explain my problem once again because I am not sure if the dotted line is the 'outline' you were talking about. When I open the page with the iframes and the taps the dotted line is still not to see but when I klick a tab it appears and then it jumps from tab to tab.
    Why does this happen and what can I do to get rid of it?



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

    Default

    Yep that's the border (or dotted line) Snookerman was addressing. You can also try using this CSS to remove it:

    Code:
    a:active{
      outline: none;
    }
    FYI that dotted line basically appears in Firefox when you set focus to links on the page, via the keyword or mouse.
    DD Admin

  5. #5
    Join Date
    Mar 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I tried both in the CSS code but it did not work. It shows still the border (dotted line).
    When I use the original code from dynamic drive without any change it works.
    Some more suggestion?

  6. #6
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Please post a link to the page on your site that contains the problematic script or attach your code so we can check it out and help you.

  7. #7
    Join Date
    Mar 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for you help.
    The code starts with a login-script (php) that I have shorten. If you need the rest I can post it, too.

    PHP Code:
    <?php
    error_reporting
    (E_ALL);
    session_start(); // Session starten
    .
    .
    if(!isset(
    $_SESSION['loggedin'])){
    .
    .
    ?>
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" >
    <title>...</title>
    
    <style type="text/css">
    
    body{
    background-image: url('images/wall.jpg');
    margin-right: auto;
    }
    
    iframe{
    background-color:#fff;
    }
    
    /*Eric Meyer's based CSS tab*/
    
    #tablist{
    	padding: 3px 0;
    	margin-left: 0px;
    	margin-bottom: 0;
    	margin-top: 0.1em;
    	font: bold 12px Verdana;
    	margin-right: 0;
    	text-align: center;
    }
    
    #tablist li{
    list-style: none;
    display: inline;
    margin: 0;
    }
    
    #tablist li a{
    text-decoration: none;
    padding: 3px 0.5em;
    margin-left: 3px;
    border: 1px solid #778;
    border-bottom: none;
    background: white;
    }
    
    #tablist li a:link, #tablist li a:visited{
    color: navy;
    }
    
    #tablist li a:hover{
    color: #000000;
    background: #C1C1FF;
    border-color: #227;
    }
    
    #tablist li a.current{
    background: lightyellow;
    }
    
    </style>
    
    <script type="text/javascript">
    
    /***********************************************
    * Tabbed Document Viewer script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    ***********************************************/
    
    var selectedtablink=""
    var tcischecked=false
    
    function handlelink(aobject){
    selectedtablink=aobject.href
    tcischecked=(document.tabcontrol && document.tabcontrol.tabcheck.checked)? true : false
    if (document.getElementById && !tcischecked){
    var tabobj=document.getElementById("tablist")
    var tabobjlinks=tabobj.getElementsByTagName("A")
    for (i=0; i<tabobjlinks.length; i++)
    tabobjlinks[i].className=""
    aobject.className="current"
    document.getElementById("tabiframe").src=selectedtablink
    return false
    }
    else
    return true
    }
    
    function handleview(){
    tcischecked=document.tabcontrol.tabcheck.checked
    if (document.getElementById && tcischecked){
    if (selectedtablink!="")
    window.location=selectedtablink
    }
    }
    
    </script>
    </head>
    
    
    <body>
    
    <div align="center">
    
    
    [PHP]<?php
    // nicht eingeloggt ?
    if(!isset($_SESSION['loggedin'])){
    ?>[/PHP]
    <br >
    <br >
    <br >
    <br >
    <div align="center">
    <form action="index.php" method="POST">
    <table bgcolor="#C8CFB4">
    <tr>
    	<td colspan="2" align="center" bgcolor="#C8CFB4"><br><br>Login:</td>
    </tr>
    <tr>
    	<td width="50%" bgcolor="#C8CFB4" style="height: 30px">Email:</td>
    	<td width="50%" style="height: 30px"><input name="email" size="18" type="text" >
    </tr>
    <tr>
    	<td width="50%" bgcolor="#C8CFB4">Password:</td><td width="50%"><input name="password" size="18" type="text" >
    </tr>
    <tr>
    	<td colspan="2" align="center"><input type="submit" name="submit" value="submit" ></td>
    </tr>
    </table>
    </form>
    </div>
    [PHP]<?php
    }
    // ansonsten: wenn eingeloggt:
    else
    {
    ?>[/PHP]
    <ul id="tablist">
    <li><a class="current" href="home.html" onClick="return handlelink(this)">HOME</a></li>
    <li><a href="Seite1.php" onClick="return handlelink(this)">Person1</a></li>
    <li><a href="Seite2.php" onClick="return handlelink(this)">Person2</a></li>
    <li><a href="Seite3.php" onClick="return handlelink(this)">Person3</a></li>
    <li><a href="Seite4.php" onClick="return handlelink(this)">Person4</a></li>
    <li><a href="Seite5.php" onClick="return handlelink(this)">Person5</a></li>
    <li><a href="index.php?logout=1">Logout</a></li>
    </ul>
    <iframe id="tabiframe" src="home.html" width="950px" height="550px" align="center"></iframe>
    [PHP]<?php } ?>[/PHP]
    </div>
    </body>
    </html>

  8. #8
    Join Date
    Mar 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello Snookerman,

    Do you think you can help me or do you need more information?

    Thanks.

  9. #9
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    I don't see the code in there. Add this to your css:
    Code:
    #tablist li a{
    text-decoration: none;
    padding: 3px 0.5em;
    margin-left: 3px;
    border: 1px solid #778;
    border-bottom: none;
    background: white;
    outline-style: none;
    }
    Good luck!

  10. #10
    Join Date
    Mar 2009
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry, nothing changed. Also when I put
    Code:
    outline-style: none;
    in
    Code:
    #tablist li a
    as you told me. It still shows the dotted line.
    Do you have another idea?

    Thanks.

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
  •