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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:54:38+00:00 2026-06-08T02:54:38+00:00

The intent is to target all the other elements of the same type &

  • 0

The intent is to target all the other elements of the same type & same level whenever one is hovered. Tried

a:hover ~ a

Only to notice that this doesn’t target the elements before the hovered one… Is there a solution with css? Or should I just somehow js my way out of this

  • 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-08T02:54:39+00:00Added an answer on June 8, 2026 at 2:54 am

    This is a variation on the parent or < selector question (of which there are many). I know it’s not quite the same, but I’m sure you can imagine how a sibling selector would be derived from a parent selector.

    Jonathan Snook has an excellent blog post on why this doesn’t exist, and I don’t think I can do any better, so I’ll leave you to read that if it interests you. Basically, it’s a technically difficult job because of the way elements are selected, and it would lead to a whole world of mess in terms of code structure.

    So the short answer is, this doesn’t exist and you’ll need to resort to JS to fix it, I’m afraid.

    Edit: Just a couple of examples of fixes. Using jQuery:

    $(selector).siblings().css({...});
    

    or if you want to include the element:

    $(selector).parent().children().css({...});
    

    Or in vanilla JS:

    var element = document.querySelectorAll(selector); // or getElementById or whatever
    var siblings = element.parentNode.childNodes;
    for (var i = 0; i < siblings.length; i++) {
        if (siblings[i] !== element) { // optional
            siblings[i].style.color = 'red';
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Intent intent=new Intent(this,Game.class); intent.putExtra(razmer, level); startActivity(intent); method startActivity() call constuctor class.This method creat object
public void openOptions() { Intent intent=new Intent(this,Game.class); //intent.putExtra(razmer, level); startActivity(intent); // Intent intent=new Intent(this,Options.class);
I have an intent to another class and all it does it just flag
I have tried all that i could to generate the R.java file but in
Is is possible to pass via Intent target image size to camera when using
My intent is to proxy Roo Maven repository with my local Nexus installation, so
My intent is to create a dictionary containing whose keys are primitives and whose
I am sending intent to a broadcast receiver like this. Intent cpIntent = new
I am broadcasting an intent when a record button is clicked. a boolean variable
I am able to intent to the youtube app to view a video easily

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.