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 7458339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:26:05+00:00 2026-05-29T13:26:05+00:00

I am styling my top level <li> to look like tabs. and on rollover

  • 0

I am styling my top level <li> to look like tabs. and on rollover a div shows but if there are nested <ul> <li>‘s in the div they inherit the same tab style as the top level <li>‘s

below is my style:

#menu li a {
    font-family:Arial, Helvetica, sans-serif;
    font-size:13px; 
    color: #ffffff;
    display:block;
    outline:0;
    text-decoration:none;
    padding:10px 9px 2px 9px;
    /* Background color and gradients */

    background: #da0000;
    background: -moz-linear-gradient(top, #b80202, #da0000);
    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#b80202), to(#da0000));

    /* Rounded corners */

    -moz-border-radius: 5px 5px 0px 0px;
    -webkit-border-radius: 5px 5px 0px 0px;
    border-radius: 5px 5px 0px 0px;
}

This is my HTML

<li>
    <a href="#">Headquarters</a>
    <div class="dropdown_2columns">
        <div class="col_2">
            <ul>
                <li><a href="board.php">Board</a></li>
                <li><a href="#">Staff</a></li>
            </ul>
        </div>
    </div>
</li>

I thought adding a class to the top level <li> would help but no luck. Is there something I am missing? when the code above runs “Board” and “Staff” both have a red tab effect on them.

  • 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-05-29T13:26:05+00:00Added an answer on May 29, 2026 at 1:26 pm

    Well, adding a class to the top level <li> won’t work – because the inner <a>‘s will still be affected by:

    #menu li.myclass a
    

    I.e., they’re anchor elements inside a <li> with class “myclass”.

    Instead, you can change the rule to:

    #menu > li > a
    

    … meaning, only <a>‘s that are immediate children of <li>‘s, which are immediate children of #menu, will be affected (IE6 doesn’t support this). This is assuming it’s your <ul> that has the id “menu”.

    Or you could use (mostly for IE6 compatibility):

    #menu li li a
    {
        /* Undo styles you applied to #menu li a */
    }
    

    Note that in this, you’ll have to reset/undo/”overwrite” all the styles previously set on #menu li a that you don’t want to apply to the inner anchors.

    An alternative for IE6 – where you won’t need to reset/undo styles – is to set a class on the <a>‘s rather than the <li>‘s:

    #menu li a.tab
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There's been many questions on styling on action bars, but the ones I've found
I am styling the messages in red for errors and green for success. But
I'm styling a form designed by a client with the following structure: <div class=formRow>
I use some CSS styling to hide input buttton, images and so on but
My code looks like this: css: .top { position: absolute; top:0; left:0; height: 1600px;
I was wondering if there was a way to change styling of the navigation
I have a sceanrio where i want to change the styling of a div
Please consider the following HTML with styling. <div style=border: 1px solid;height: 600px;> <button id=create_new_estimate
I have a small menu div that i would like to keep in the
I have a problem with the styling of a searchbar in IE9. There 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.