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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:44:08+00:00 2026-06-15T14:44:08+00:00

my original problem involves bootstrap icons inside a div which changes color on hover.

  • 0

my original problem involves bootstrap icons inside a div which changes color on hover.
for simplicity, I made the jsfiddle with the follow code to explain the problem

html:

<div id="parent">
    <div id="child">
    </div>
</div>​

css:

#parent{
 background-color:red;
 width:100px;
 height:100px;   
}

#parent:hover #child{
 background-color:blue;  
 display:block;    
}
#child{
 background-color:transparent;  
 width:10px;
 height:10px;  
 display:none;
 border: 1px solid black;
}

jsfiddle can be found here

The problem:

the outcome of this code is not what I want to accomplish. I’d like #child to appear background-color: tranparent but #parent to change color to blue.

I know my :hover is wrong, but how do I apply 2 different things on one :hover (change color of #parent and displaying #child)?

  • 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-15T14:44:09+00:00Added an answer on June 15, 2026 at 2:44 pm

    You must use two selectors, you can’t do it with only one, so you can write something like the following:

    #parent:hover{
     background-color:blue;   
    }
    #parent:hover #child {
     display:block;
    }
    

    Demo: http://jsfiddle.net/qTdkt/2/

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

Sidebar

Related Questions

I am using zeromq to solve a problem which involves several hundred (potentially thousands)
I have a selection of icons which when I hover over them trigger an
Original Problem: I have 3 boxes each containing 200 coins, given that there is
Original Problem In building our projects, I want the mercurial id of each repository
Original problem: What is the right column format for a unix timestamp? The net
My original problem was how to map multidimensional int array to string.Following was the
ORIGINAL TEXT REMOVED OK, so I found the original problem thanks to a helpful
The code below is (hopefully) a minimized testcase of my original problem. I'm trying
This is a slightly original variation on a common problem. I have a fairly
I had a problem that was making the original array to change, the curious

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.