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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:19:05+00:00 2026-05-23T04:19:05+00:00

I am creating a simple drop down menu using css. <ul> <li id=base><a href=projects.php

  • 0

I am creating a simple drop down menu using css.

<ul>
    <li id="base"><a href="projects.php" class="button">Projects</a>
        <ul>
            <li>Project 1</li>
            <li>Project 2</li>
        </ul>
    </li>
</ul>

What I can’t figure out is, how can I get the anchor text “Projects” to change it’s background correctly to indicate you’re browsing under that list.

If I apply a background effect to li#base,

li#base:hover {
    background: #4b4b4b;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -khtml-border-radius: 4px;
}

I get this undesired background if I am hovering over “Project 1” or “Project 2”:
undesired

The image below is how I am wanting it to look, but this is with the hover pseudoclass applied to the anchor instead of li#base (which will only stay highlighted when I am over the link and not the whole list):
desired

I tried to present this in the simplest way I could think of…

  • 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-23T04:19:06+00:00Added an answer on May 23, 2026 at 4:19 am

    You’re setting the radius of all 4 corners. You want a rounded corner on just top right and top left.

    -webkit-border-top-left-radius: 4px;
    -webkit-border-top-right-radius: 4px;
    -moz-border-radius-topleft: 4px;
    -moz-border-radius-topright: 4px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a simple application using the Kohana PHP framework, just FYI. This is
I am using Visual Studio 2008 Express and I tried creating a simple console
Im creating a simple message board with php/mysql. Users enter their name and a
I am creating a file tree using PHP & jQuery, but I'm having trouble
i am creating simple dashboard view in which i using createDashboardItem function item has
I am creating a collection class and would like it to be drop-in-replacement for
I am creating a simple word doc, using the openXml SDK. It is working
I'm struggling with creating a simple one-to-many relationship using Code First in EF. I
I'm creating a simple API that creates typed classes based on JSON data that
I'm creating a simple tag system that allows me to link a tag to

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.