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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:16:51+00:00 2026-06-05T22:16:51+00:00

I have two divs floated next to one another: <div id=parent> <div id=child_1 style=float:left>

  • 0

I have two divs floated next to one another:

<div id="parent">
    <div id="child_1" style="float:left"> content </div>
    <div id="child_2" style="float:left"> content </div>
    <div style="clear:both"></div>
</div>

When either div is hovered over, I’d like to change the colors of both divs (to something different). Say, one yellow, the other red. Is there a way to do this? I put the div id="parent" in there thinking that I could do something when that is hovered over; change the divs with this id (or class) to this color within the parent. But I don’t really know if this is possible. Also, jquery hover events always seem very delayed with respect to css, so I am trying to avoid using a script. Thanks much!

  • 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-05T22:16:53+00:00Added an answer on June 5, 2026 at 10:16 pm
    div#parent:hover div#child_1 {
      color: red;
    }
    
    div#parent:hover div#child_2 {
      color: yellow;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two divs inside a container div. One need to float left the
I have two divs like so <div id=parent style=width:100px:overflow:hidden;> <div id=child> tooooooooooooooooooooo much content
i have two divs one floated to the left and the other to the
I have two divs one inside another, i would like to overlap one div
I have two divs floated left so that they appear next to each other.
I have floated two divs left but the div on the right has a
I have two divs float:left. I z-index the first div to be above, but
I have two divs one being a child to another. I wish my parent
I have two divs in a container. One is left bar and another is
I have two divs next to each other, one with float: right and the

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.