Results 1 to 6 of 6

Thread: Ajax tab structure shifting vertically

  1. #1
    Join Date
    Jul 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Ajax tab structure shifting vertically

    1) Script Title: Ajax Tabs Content script

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

    3) Describe problem:

    I have a question regarding the vertical alignment of "Multiple Ajax Tabs Contents on the same page" as described at the bottom of the above URL.
    On that page an example is given of a tab strucuture(meaning the entire 5-tab layout of: Introduction, bird, dog, cat, sea otter structure).

    Let's say I have 2 tab structures, which are at the an equal vertical position but horizontally separated and positioned one at the left(structure 1) and the other(structure 2) at the right side of a web page. Is it possible to force both tab structure to always stay on top, regardless of which individual tab is clicked in either structure. With the current code it seems that if individual tabs contain a lot of content relative to other individual tabs in either structure, clicking on the tabs with little content would cause the whole tab structure to move vertically down the page. This leaves a lot of white space and requires significant down-scrolling to locate the tab structure again.

    So, I was wondering if there is a way to force both tab structures to always stay on top, even if a tab with small amount of content is clicked on.

    Regards.

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

    Default

    Looks like a previous problem someone else posted a while ago: http://www.dynamicdrive.com/forums/s...ad.php?t=21878

  3. #3
    Join Date
    Jul 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I've tried the suggested solution but it only seems to work if there is one tab structure on a webpage. I have 2 parallel structures that I am trying to align vertically regardless of which individual tab is clicked. If a 'large content' tab (within strucuture 1, let's say) is clicked (and structure 2 doesn't have a tab with an equally large content), then structure 2 gets pulled significantly down, with a large white space above and below it.

    Thanks in advance.

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

    Default

    Do you have a link to the problem page? It'd definitely be easier with a visual in front of me of the problem.

  5. #5
    Join Date
    Jul 2007
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    okay, hopefully the following example site below is a little clearer. Clicking on the tab structure on the left(for instance the 'contact' tab) causes the tab structure on the right to move down significantly.

    So my question is whether it is possible to keep both structures on the top, to not move down, regardless of which tab is clicked(on either structure).

    http://rixee.notlong.com

    Regards.
    Last edited by silverz; 08-12-2007 at 01:20 PM.

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

    Default

    Ok, it looks like your problem is actually just a layout issue with your table cells containing the two Tab Contents. Inside both td tags containing the two contents, you need to add a "valign" attribute:

    Code:
    <td align="center" valign="top">

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
  •