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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:57:01+00:00 2026-05-25T06:57:01+00:00

How to change the style of child element when there is hover on parent

  • 0

How to change the style of child element when there is hover on parent element. I would prefer a CSS solution for this if possible. Is there any solution possible through :hover CSS selectors. Actually I need to change color of options bar inside a panel when there is an hover on the panel.

Looking to support all major browsers.

  • 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-25T06:57:01+00:00Added an answer on May 25, 2026 at 6:57 am

    Yes, you can definitely do this:

    .parent:hover .child {
       /* ... */
    }
    

    This uses the :hover pseudoclass to restrict to elements matching .parent which are also hovered, and the descendant combinator (space) to select any descendant that matches .child.

    Here’s a live example:

    .parent {
      border: 1px dashed gray;
      padding: 0.5em;
      display: inline-block;
    }
    
    .child {
      border: 1px solid brown;
      margin: 1em;
      padding: 0.5em;
      transition: all 0.5s;
    }
    
    .parent:hover .child {
      background: #cef;
      transform: scale(1.5) rotate(3deg);
      border: 5px inset brown;
    }
    <div class="parent">
      parent
      <div class="child">
        child
      </div>
    </div>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<div onclick="test(this)"> Test <div id="child">child</div> </div> I want to change the style of the
I have a parent Div : <div id=ctl00_MainContentAreaPlaceHolder_deliveryOpen class=delivery_open style=display: block;> //Child select Element
The menu on this page: http://goldencraft.co/wp/ CSS: http://goldencraft.co/wp/wp-content/themes/minecraft/style.css Hover over My Account then View
Is it possible to change the style of a WinForm border? I know that
In my website I would like to change some style properties of a div
Infragistics Grid disappears when grid parent element is expanded/collapsed using JavaScript style.display property. When
Any advice would be much appreciated, I'm sure this is simple for some of
I need to change a background image of a parent div (content-indent) when child
I want to change style of selected points. When i select point it is
I want to change font style of a control , for a short time.

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.