Results 1 to 10 of 10

Thread: Tab Content Script - same length on each tab?

  1. #1
    Join Date
    Aug 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tab Content Script - same length on each tab?

    1) Script Title: Tab Content Script

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

    3) Describe problem: Love this script! Okay, now I just need to figure out how to make each tab the same length. Some have shorter text and content than others but I want to make them even in length.

    Okay, I figured out the solution. I was able to make the tabs all even lengths by changing the following:

    .tabcontentstyle{
    border: 1px solid gray;
    width: 630px;
    height: 410px;
    margin-bottom: 1em;
    padding: 10px;
    left: 0px;
    }

    I added height: 410px to the tabcontentstyle. You can increase or decrease the height as you see fit.

    It works in Firefox and IE6.
    Last edited by bluemoon562; 10-17-2006 at 01:41 AM.

  2. #2
    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

    Working from the default style, see this post:

    http://www.dynamicdrive.com/forums/s...0&postcount=12
    - John
    ________________________

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

  3. #3
    Join Date
    Aug 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi John,

    That changed the tabs but didn't affect the length of the boxes the way that I wanted.

    There must be an easy way that works.

  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

    It standardizes the width of the tabs. What were you looking for?
    - John
    ________________________

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

  5. #5
    Join Date
    Oct 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You're editing the tabcontent box...
    You should edit the .shadetabs

  6. #6
    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 lorrens
    You're editing the tabcontent box...
    You should edit the .shadetabs
    That's what the post at:

    http://www.dynamicdrive.com/forums/s...0&postcount=12

    that I mentioned before does, more or less:

    Code:
    .shadetabs li a{
    float:left;
    width:160px;
    text-decoration: none;
    padding: 3px 7px;
    margin-right: 3px;
    border: 1px solid #778;
    color: #2d2b2b;
    background: white url(shade.gif) top left repeat-x;
    }
    and:

    Code:
    .contentstyle{
    clear:left;
    border: 1px solid gray;
    width: 450px;
    margin-bottom: 1em; padding: 10px;
    }
    But, I think I left out:

    Code:
    .shadetabs li a{
    display:block;
    float:left;
    width:160px;
    text-decoration: none;
    padding: 3px 7px;
    margin-right: 3px;
    border: 1px solid #778;
    color: #2d2b2b;
    background: white url(shade.gif) top left repeat-x;
    }
    The width for .shadetabs li a may be adjusted to suit. Width will not apply in all browsers to an anchor unless it is display:block but then there is a line break after each tab hence, float left and then later this must be cleared in the .contentstyle element. Editing the .shadetabs directly didn't work when I tried it.
    - John
    ________________________

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

  7. #7
    Join Date
    Oct 2005
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I would like to minimize the space between tabs. Where do I change that. I am assuming it is in the css file but I change the paddings but nothing happens.

  8. #8
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    You should'nt hijack someone's thread
    I suppose its the right margin
    Code:
    .shadetabs li a{
    text-decoration: none;
    position: relative;
    z-index: 1;
    padding: 3px 7px;
    margin-right: 3px;
    border: 1px solid #778;
    color: #2d2b2b;
    background: white url(shade.gif) top left repeat-x;
    }
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  9. #9
    Join Date
    Oct 2005
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    You should'nt hijack someone's thread
    What do you mean? This is in relating to the same topic. Don't you want it to be in the same thread?

    Thanks for the help though.

  10. #10
    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

    It means that if you have a new question, even if it seems to relate to an existing thread, if it isn't the exact same issue, the current policy is to encourage you to start a new thread in which you define the script you are working with and the exact issue you are having with it. Providing a link to your page is always a good idea as well.
    - 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
  •