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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:16:04+00:00 2026-06-09T13:16:04+00:00

A tricky one here. I have styling for two UL’s on a page which

  • 0

A tricky one here.

I have styling for two UL’s on a page which both contain anchors.

Each of the UL’s have their own specific ID and specific styling which is all correct.

Here is the confusing part – say I have this:

#nav {
    margin: 20px 0 0 0;
  }
    #nav li {
      float: left;

    }
      #nav li a {
        display: block;
        text-transform: uppercase;
        color: #555454;
        font-size: 14px;
        padding: 11px 17px;

      }

And then this:

#gt-list 
    {
        margin: 10px 0 0 0;
    }
        #gt-list li, a
        {
            color: #fff;
            margin: 0 0 10px 0;
        }
            #gt-list li a:hover 
            {
                color: #ff6b00;
            }
        #gt-list li img 
        {
            float: left;
            margin: 0 15px 0 0;
            width: 20px;
        }
        #gt-list li span
        {
            float: left;
            display: inline-block;
            margin: 2px 0 0 0;

        }

Here is HTML to go with:

<ul id="nav">
                    <li class="selected">
                        <a href="#">
                            Home
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            About us
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            Ways to give
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            Our Work
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            News
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            Learn
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            Contact Us
                        </a>
                    </li>
                </ul>

The above is actual styling used on a site.

So here is my issue: the #nav is picking up the LI styling from #gt-list along with anchor styling.

I have inserted all parent div ID’s to each UL and this had no affect.

I don’t understand this!?!?

  • 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-09T13:16:05+00:00Added an answer on June 9, 2026 at 1:16 pm

    The culprit is:

    #gt-list li, a
        {
            color: #fff;
            margin: 0 0 10px 0;
        }
    

    The comma between li and a causes the styles specified to be applied to a globally as it denotes:
    All li within #gt-list AND all a.
    Whereas what you want it to read is:
    All li AND a within #gt-list

    Change it to

    #gt-list li a
        {
            color: #fff;
            margin: 0 0 10px 0;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here's a tricky one. I have the following XML <test> <testElement SomeAttribute=<otherxml><otherElement>test test</otherElement></otherxml>> </testElement>
Here's a tricky one. I have data as follows: User ID Name Skill Sets
This is a tricky one, for me at least. I have a page that
I have a slightly tricky one here I hope the community can help me
i have a tricky one here (i think) I was just put on a
I have a tricky one here. I have a number of results in a
Here's a tricky one to start the morning. I have a series of icons.
That one is a tricky one I believe. I would like to merge two
This one is a little tricky. Say I have this XmlDocument <Object> <Property1>1</Property1> <Property2>2</Property2>
Here's a tricky one - how do I programatically create and interrogate a database

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.