Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8413569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:56:40+00:00 2026-06-10T00:56:40+00:00

Using jQuery 1.7.1 and jQuery UI 1.8.21. I am struggling with a bug in

  • 0

Using jQuery 1.7.1 and jQuery UI 1.8.21.

I am struggling with a bug in my custom jQuery UI Tabs. My tabs are not the usual horizontal type, I have them displayed vertically (fixed width) as some kind of grid and my content is on the right (see picture below).

Now my issue is that everything goes down whenever I select the last tab of the line (5,10,15,…), and 6 comes under 5. The right picture illustrates the problem :

enter image description here enter image description here

The reasons behind the use of Tabs is that I can use approximately 30k lines from a previous project.

Here is my vertical tabs :

$("#chapters")
    .tabs({ ... })
    .addClass('ui-tabs-vertical ui-helper-clearfix');

My CSS, it includes a lot of tests and mistakes and useless parts but still :

.ui-tabs-vertical .ui-tabs-nav
{
    padding: 2px;
    float: left;
    width: 185px;
    display:inline;
}
.ui-tabs-vertical .ui-tabs-nav li
{
    width:30px;
    height:30px;
    margin: 2px;
    padding:0;
    display:inline;
}
.ui-tabs-vertical .ui-tabs-nav li a
{
    display:block;
    margin:0;padding:0;width:100%;height:100%;
}
.ui-tabs-vertical .ui-tabs-nav li a span
{
    display:block;
    padding:0;
    margin:0;
    width:100%;
    height:100%;
    text-align: center;
    line-height: 30px;
    vertical-align: middle;
}
.ui-tabs-vertical .ui-tabs-panel
{
    padding: 3px;
    padding-left:200px;
    max-width: 548px; /* = 768px -10-paddings */
}
.ui-tabs-vertical .ui-state-active
{
    border: 0 solid #000000;
}
.ui-tabs-vertical .ui-tabs-selected
{
    padding-bottom: 0 !important;
    border: 0 solid #000000;
}

The HTML as requested in comments, it is completely generated through JS as there is a lot of algorithms handling these tabs more or less randomly, so here is the structure :

<div id="chapters" style="position:relative" class="ui-tabs">
    <ul>
    <!-- li tags coming from a for-loop -->
        <li>
            <a href="#800001"> <!-- random id but matching divs order -->
                <span style="float:left">1</span> <!-- 1,2,3... -->
            </a>
        </li>
        <!-- ... -->
        <div id="800001" class="ui-tabs-hide">
            <div id="800001_content">
                <!-- content is loaded here later... (xml parsing, lazy loading system,...) -->
            </div>
        </div>
    <!-- end of loop -->
    </ul>
</div>

Here is what I found out so far :

  • updated jQuery to 1.8.0, no change.
  • updated jQuery UI to 1.8.23, no change.
  • removed ui-tabs-selected live with firebug, no result.
  • removed ui-state-active live with firebug, no result.
  • removed the borders from the tabs (last part of css), no result.
  • removed both ui-tabs-selected AND ui-state-active, the design doesn’t break.
  • removed ui-tabs-selected and ui-state-active with jQuery in a select or show event.

From my last result I would guess jQuery UI Tabs is applying some CSS to the selected tab that I would need to remove.tab. Unfortunately removing these classes break the tabs functionality, .tabs(“option”,”selected”) cannot be set it just goes to the first tab and of course I need it. So I took a look into this widget’s code but without any luck…

I would be open to any kind of solutions, CSS, Javascript, face palming or even brainwashing. If .tabs() is the source of my problem, I could imagine having .verticalTabs() as a modified clone of .tabs().

I already imagined workarounds by hiding my tabs and making a custom grid with events to select tabs, but I’d rather find another path. 🙂

Thanks in advance for your help!

JSFiddle to try it out : http://jsfiddle.net/zumproductions/v26pE/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T00:56:41+00:00Added an answer on June 10, 2026 at 12:56 am

    If you remove the .ui-tabs-selected class from the li element the problem goes away. So its something in there. In particular it looks like the following styles are the issue:

    In the default css:

    .ui-tabs .ui-tabs-nav li.ui-tabs-selected {
       margin-bottom: 0;
    }
    

    Your custom css:

    .ui-tabs-vertical .ui-tabs-selected {
        border: 0 solid #000000;
    }
    

    To fix it you can set these styles: margin-bottom: 2px and border 1px solid transparent

    Updated jsfiddle: http://jsfiddle.net/v26pE/3/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been struggling to capture user input using JavaScript and jQuery . I've tried
Using jQuery timepickr: http://archive.plugins.jquery.com/project/jquery-timepickr Having included these files: jquery-1.7.1.min.js jquery-ui-1.8.21.custom.min.js ui.timepickr.js And getting this
Using Jquery TableSorter, I am creating a custom parser to sort elapsed time <td>
Using Jquery , I have an array result [<a href=><img src=image1></a>,<a href=><img src=image2></a>] if
I am struggling to get a list created by Ember.js sortable using jQuery.ui. The
I have been struggling with what I feel is a simple JQuery selector issue,
Struggling with onchange for JQuery Datetime plugin: http://plugins.jquery.com/project/datetime I am using the following code.
I'm struggling with some validation using jQuery's validator plugin. Basically I'm checking if username
I am trying to achieve a scrolling effect using jQuery. I have a background
When using the jQuery.ajax() method, I am struggling to filter the data that is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.