Results 1 to 4 of 4

Thread: Ajax Tabs Content Script

  1. #1
    Join Date
    Sep 2008
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Ajax Tabs Content Script

    1) Script Title: Ajax Tabs Content Script

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

    3) Describe problem: I was trying to center div which contains the tabs and the content.. When I added on div margin auto (to get it centered) content div moved but tabs where still aligned left side of page. Any help?

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

    Default

    It depends on which tabs interface you're looking (based on the default ones on the script page). Tabs that are styled using float:left are generally hard to center. The first "blue shaded" tabs demo on the script page does not use float:left, and can easily be centered by setting text-align:center inside its CSS.
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    Seldimi (02-17-2009)

  4. #3
    Join Date
    Sep 2008
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Yea.. I am using first tab (shadetabs) I managed to get the div below the tabs centered but couldnt center the tabs.. I was getting a thing like this

    Code:
    Tab | Tab | Tab | Tab 
                                               Content Content Content Content 
                                               Content Content Content Content 
                                               Content Content Content Content

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

    Default

    For "shade tabs", you should be able to center the tabs just by setting the value in red below in its CSS:

    Code:
    .shadetabs{
    padding: 3px 0;
    margin-left: 0;
    margin-top: 1px;
    margin-bottom: 0;
    font: bold 12px Verdana;
    list-style-type: none;
    text-align: center; /*set to left, center, or right to align the menu as desired*/
    }
    DD Admin

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
  •