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

Thread: How to center tabs in DD Color Tab II

  1. #1
    Join Date
    Nov 2006
    Location
    Chicago Suburbs
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to center tabs in DD Color Tab II

    I am using this contribution (DD Color Tab II) and want to center the tabs (instead of left align). What changes do I need to make? Please look at example page - http://www.nightstay.us/footer.html

    Thanks for your help!
    Manjeet

  2. #2
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    Hi there manjeet,

    and a warm welcome to these foums.

    Firstly, to get IE out of Quirks Mode always use a full DOCTYPE...
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    ...instead of...
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0  Transitional//EN">
    Secondly change this in your stylesheet...
    Code:
    
    #invertedtabs {
       margin-left: 4px;
       padding: 0;
       width: 100%;
       background: transparent;
       voice-family: "\"}\"";
       voice-family: inherit;
       padding-left: 5px;
    }
    ...to this...
    Code:
    
    #invertedtabs {
       margin:auto;
       width: 510px;
       background-color: transparent;
       voice-family: "\"}\"";
       voice-family: inherit;
    }
    
    coothead

  3. #3
    Join Date
    Nov 2006
    Location
    Chicago Suburbs
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks coothead, it worked like a charm! I knew there were still good people on this earth. :-) Thanks for the warm welcome!

    I was playing around with "#invertedtabs ul" section after seeing other contributions, and had put "text-align:center" directive and was hoping for it to work, like a switch - left/center/right! Obviously, it has no value.

    Thanks again!
    Manjeet

  4. #4
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    No problem, you're welcome.

  5. #5
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Next time,

    Warning: Please post all Dynamic Drive Script Related Questions here
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  6. #6
    Join Date
    Jan 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks so much for the CSS on centering the tabs! The DD Color Tab II tabs look terrific on the site I had built (Balletpacifica.org). I applied the new definition for #invertedtabs and it works great!

    Mari

  7. #7
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

  8. #8
    Join Date
    Oct 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question align the menu right

    What would you do to make it align right?

  9. #9
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,920
    Thanks
    2
    Thanked 267 Times in 262 Posts

    Default

    Quote Originally Posted by gfin19
    What would you do to make it align right?
    change this...
    Code:
    #invertedtabs {
       margin:auto;
       width: 510px;
       background-color: transparent;
       voice-family: "\"}\"";
       voice-family: inherit;
    }
    ...to this...
    Code:
    #invertedtabs {
       float:right;
       width: 510px;
       background-color: transparent;
       voice-family: "\"}\"";
       voice-family: inherit;
    }
    coothead

  10. #10
    Join Date
    Oct 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I should have thought of that, thanks again.

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
  •