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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:19:45+00:00 2026-06-09T21:19:45+00:00

I have this dropdown menu and I’m using CSS to highlight the items i’m

  • 0

I have this dropdown menu and I’m using CSS to “highlight” the items i’m hovering over. My question is I want to display this down arrow only on items that have a drop-down category, below is how i’m calling it in HTML. I gave it the ‘subitem’ tag. So I created the following CSS to display the arrow. The problem is the .subitem property overwrites the general hover property so i’m only seeing the arrow when I hover over it, is there a way that I can see both?

enter image description here

#cssmenu  > ul > li.subitem 

{
    padding-right:5px;
background: url(images/arrow2.png) no-repeat;

background-position-y: 10%;

}


#cssmenu  > ul  li.subitem:hover

{

background: url(images/arrow2.png) no-repeat;


}

<div id='cssmenu'>
<ul>
   <li><a href='index.html'><span>Home</span></a></li>
    <li class='subitem'><a href='#'><span>Products</span></a>
      <ul>
         <li><a href='#'><span>Product 1</span></a></li>
         <li><a href='#'><span>Product 2</span></a></li>
      </ul>
   </li>

#cssmenu  > ul li:hover{


    padding : 3 px, 1 px;
background: #828a91; /* Old browsers */
background: -moz-linear-gradient(top,  #828a91 0%, #636363 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#828a91), color-stop(100%,#636363)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  #828a91 0%,#636363 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  #828a91 0%,#636363 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  #828a91 0%,#636363 100%); /* IE10+ */
background: linear-gradient(to bottom,  #828a91 0%,#636363 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#828a91', endColorstr='#636363',GradientType=0 ); /* IE6-9 */
 -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 0 rgba(0,0,0,.25), inset 0 -3px 0 rgba(255,255,255,.2), 0 1px 0 rgba(0,0,0,.1);
    -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 0 rgba(0,0,0,.25), inset 0 -3px 0 rgba(255,255,255,.2), 0 1px 0 rgba(0,0,0,.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 0 rgba(0,0,0,.25), inset 0 -3px 0 rgba(255,255,255,.2), 0 1px 0 rgba(0,0,0,.1);

}
  • 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-09T21:19:47+00:00Added an answer on June 9, 2026 at 9:19 pm

    You have to repeat hover style like below for your .subitem:hover style

    #cssmenu  > ul  li.subitem:hover
    {
    
    padding : 3 px, 1 px;
    background: #828a91 url(images/arrow2.png) no-repeat; /* Old browsers */
    background: -moz-linear-gradient(top,  #828a91 0%, #636363 100%), url(images/arrow2.png) no-repeat; /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#828a91), color-stop(100%,#636363)),url(images/arrow2.png) no-repeat; /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top,  #828a91 0%,#636363 100%),url(images/arrow2.png) no-repeat; /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top,  #828a91 0%,#636363 100%),url(images/arrow2.png) no-repeat; /* Opera 11.10+ */
    background: -ms-linear-gradient(top,  #828a91 0%,#636363 100%),url(images/arrow2.png) no-repeat; /* IE10+ */
    background: linear-gradient(to bottom,  #828a91 0%,#636363 100%),url(images/arrow2.png) no-repeat; /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#828a91', endColorstr='#636363',GradientType=0 ); /* IE6-9 */
    -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 0 rgba(0,0,0,.25), inset 0 -3px 0 rgba(255,255,255,.2), 0 1px 0 rgba(0,0,0,.1);
    -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 0 rgba(0,0,0,.25), inset 0 -3px 0 rgba(255,255,255,.2), 0 1px 0 rgba(0,0,0,.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -2px 0 rgba(0,0,0,.25), inset 0 -3px 0 rgba(255,255,255,.2), 0 1px 0 rgba(0,0,0,.1);
    
    }
    

    if you look carefuly, the trick is to set two images in same css property

    background: <image1>, <image2>;
    

    which means

    background: -moz-linear-gradient(top,  #828a91 0%, #636363 100%), url(images/arrow2.png) no-repeat;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this CSS dropdown menu. I want the homepage to start on the
So I have this dropdown menu, when you hover over a link a dropdown
So i have this dropdown made in html/css/js.. it slides down on mouseover, but
I have this dropdown menu , and all i want to do is upon
I have this dropdown (select) menu generated with JQuery, dynamically using JSON coming from
I have a simple dropdown menu and I'd like to have this menu close/hide
I have a simple dropdown menu: <form class=feedmenu align=center> <select onchange=showRSS1(this.value)> <option value=>Select an
I have a drop down menu with an embedded video. This video shows and
I have a dropdown list. I am using onchange event of this dropdown to
I have this: var $ul = $(this).children(ul); $ul.animate({opacity: 0}, 1000); $ul.delay(1000).css(display, none) It's for

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.