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

  • SEARCH
  • Home
  • 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 8835315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:13:54+00:00 2026-06-14T09:13:54+00:00

I have these css code: .tabs_inactive { border: 1px solid #cccccc; border-top-left-radius: 8px; border-top-right-radius:

  • 0

I have these css code:

    .tabs_inactive {
        border: 1px solid #cccccc;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        background-color: #eeeeee;
        border-bottom: #cccccc;
    }

    .tabs_inactive:hover {
        background-color: #ff8000;
        border-color: #ff8000;
        cursor: pointer;
    }

    /*this does not work*/
    .tabs_inactive:hover a {
        color: #ffffff;
    }

    .tabs_active {
        background-color: #ffffff;
        border-bottom: 2px solid #ffffff;
    }

    .tabs_active:hover{
        background-color: #ffffff;
        border: 1px solid #cccccc;
        border-bottom: 2px solid #ffffff;
        cursor: default;
    }

    .tabs_active:hover a {
        cursor: default;
    }

The last one (.tab_active:hover a) is working perfectly in my webpage, but the third block is not. I can not figure out why this happened.
Could somebody explain me why the third block doesn’t work?
Thanks!


UPDATE 1:
Here is the relative JavaScript code:

//add class "tabs_inactive" to the original tabs option.
$( "#tabs ul li" ).addClass("tabs_inactive");

//default: set the first tab as the active one.
$( "#tabs ul li" ).first().toggleClass("tabs_active");

//to make sure the style sheet will be changed when click on the inside <a> tag
$( "#tabs ul li a" ).live( "click", function () {
    //close other tabs
    $( this ).parents("ul").children("li").each( function (){
        if( $(this).hasClass("tabs_active")){
            $(this).removeClass("tabs_active");
        }
    });
    $( this ).parent().toggleClass("tabs_active");
    return false;
});
//change the class to "tabs_active" when the tab is clicked
$( "#tabs ul li" ).live( "click", function () {
    //close other tab
    $( this ).parent().children("li").each( function (){
        if( $(this).hasClass("tabs_active")){
            $(this).removeClass("tabs_active");
        }
    });
    $( this ).toggleClass("tabs_active");
});

And also HTML code:

        <div id="tabs">
            <ul>
                <li><a href="#homepage">HOME</a> </li>
                <li><a href="#option1">option1</a> </li>
            </ul>
            <div id="homepage">
                <p>
                    HOME:
                    Here is the home page
                </p>
            </div>
            <div id="option1">
                <p>
                    Option1:
                    Here is the tag page 1
                </p>
            </div>
        </div>

So, yes, I am trying to implement a tab menu, and this is a practice so I don’t want to use the original JqueryUI function. Dose somebody know that what is the problem?
Thank you.

  • 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-14T09:13:56+00:00Added an answer on June 14, 2026 at 9:13 am

    Sorry guys, it’s not a typo or something else, I just make a mistake that I give a font color style to the #tab ul li a before, which is using the id selector, and that make the the function toggleClass doesn’t work at all. I convert that tag from id to class then every thing works fine. thanks all, That’s my bad.

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

Sidebar

Related Questions

I have this HTML/CSS code ( JSBin ): .trackTime{width:50px; text-align:left; float:left;} .trackInputTime{width:45px; height:22px; background-color:#F4F4F4;}
I have the following css code: #Layer3 { position:absolute; width: 89%; height: 40%; left:
A lot of these pages are like mini applications that have their own CSS
I have an index.html and global.css files. When I open these files at Coda,
I have these 3 tables: and I'm using this code to join them together
I have some CSS and HTML that are as follows. There's a javascript code
I have a problem in my webpage designing in css. I have this code
I have these following code in which I want to enable 2nd hover state
i have these buttons on the top of the page: HOME, BUYING PROPERTY, SELLING
I have installed a complete blank theme with no CSS in my new wordpress

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.