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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T20:15:13+00:00 2026-06-06T20:15:13+00:00

When Dropdown is opened – I want to change default color of it. I

  • 0

When Dropdown is opened – I want to change default color of it. I want to change border color and background using css.

enter image description here

https://i.stack.imgur.com/vKwLE.png

Here is html code:

<div class="row menu">
 <ul class="nav nav-pills pull-right">
  <li class="dropdown">
    <a href="#" class="dropdown-toggle"
       data-toggle="dropdown">
      My reports
      <span class="caret my-reports-caret"></span>
    </a>
    <ul class="dropdown-menu">
      <li><%= link_to "Performance", performance_reports_path %></li>
      <li class="divider"></li>
      <li><%= link_to "Account settings", '#' %></li>
    </ul>
  </li>
</ul>
</div>

My css,that I tried:

.menu .nav-pills .dropdown .open .dropdown-toggle{
    background-color: red;
}

Where is problem in my selectors ?

  • 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-06T20:15:15+00:00Added an answer on June 6, 2026 at 8:15 pm

    Here is your problem:

    #original.menu .nav-pills .dropdown .open .dropdown-toggle {
        border: 1px solid blue;
    }
    
    #suggested.menu .nav-pills .dropdown .dropdown-toggle {
        border: 1px solid red;
    }
    

    http://jsfiddle.net/userdude/mjbN7/

    .open doesn’t exist in the element chain.

    And here is your fiddle with the border (which had both the .open and no border-style or border-width to style):

    http://jsfiddle.net/userdude/bdCMU/4/

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

Sidebar

Related Questions

I'm using this tutorial on AsyncTask with a task and a notification: https://eliasbland.wordpress.com/2011/03/11/an-example-of-how-to-run-a-background-task-and-report-progress-in-the-status-bar-using-asynctask-on-android/ What
Ok , so I tried to change the background color of the opened twitter
I am using following code to populate DropDown: $(document).ready(function(){ $('#inDistrict').sSelect(); $(#inDistrict).change(function(){ $.getJSON(filldistricts.php,{id: $(this).val(), ajax:
I need to change back-color of a ToolStripDropDownButton when its drop-down is opened. How
I want a ComboBox which has no drop-down button but can still be opened
Dropdown list 1: <select name=ddlArea onchange=showState(this.value)> Dropdown list 2: <select name=ddlFType onchange=showState(this.value)> I want
Hi I have two dropdown menus: priceMaximum and mortgageMaximum I want it so if
I'm following this tutorial here http://www.kriesi.at/archives/create-a-multilevel-dropdown-menu-with-css-and-improve-it-via-jquery on adding a menu with jquery. I've created
I want to show all of the items of a dropdown list as it
I'm trying to create a dropdown menu which can be opened and closed with

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.