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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:03:37+00:00 2026-05-26T20:03:37+00:00

From the CSS selector spec : E + F matches any F element immediately

  • 0

From the CSS selector spec:

E + F matches any F element immediately preceded by a sibling element E.

What about operator precedence? What does #id1 #id2 + #id3 match?
What about #id1 + #id2 #id3?

Is there a selector that means #id1 (#id2 + #id3) or (#id1 + #id2) #id3?
(I’m assuming ( and ) aren’t really allowed in CSS selectors, I’m not seeing them in the spec)

  • 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-26T20:03:38+00:00Added an answer on May 26, 2026 at 8:03 pm

    Every sequence of simple selectors and combinators is read by browsers from right to left, in a linear fashion. Combinators do not affect the ordering in any way. The rightmost selector, after the last combinator if any, is known as the key selector (see the reference links below for more), and that identifies the element that the rule applies to (also known as the subject of the selector, although note that the key selector may not always represent the subject of the selector, since different applications implement selectors differently).

    The selector #id1 #id2 + #id3 means

    Select element #id3
    if it directly follows as a sibling of #id2
    that is a descendant of #id1.

    A DOM structure in which #id3 would match the selector would look like this:

    #id1
      ... any level of nesting
        #id2
        #id3
    

    While #id1 + #id2 #id3 means

    Select element #id3
    if it is a descendant of #id2
    that directly follows as a sibling of #id1.

    And a DOM structure in which #id3 would match the selector would look like this:

    #id1
    #id2
      ... any level of nesting
        #id3
    

    Notice the difference in the position of element #id2 in this DOM structure, as compared to the one above.

    There isn’t much of a precedence issue here since the descendant and sibling combinators go in different directions in the DOM. Both selector sequences read right to left either way.

    Related answers:

    • CSS combinator precedence?
    • Are parentheses allowed in CSS selectors?
    • CSS Adjacent Selector / Meaning
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From my understanding of the CSS spec, a table above or below a paragraph
How to know the correct selector/group of selector for any html element quickly? I'm
jQuery SIFR reads the style of a selector directly from the CSS. So there
Has anybody bench marked selecting elements with id's and class's from CSS and javascript?
How can I change CSS from javascript . I'm using jQuery-ui Dialog and I
Consider a snippet of CSS code from a .css file in Visual Studio 2010
I recently did the Chris Coyier tutorial from the css-tricks.com weblog #38: Basics &
it is possible to import the css file from another server? let's say i
From what I know, the em keyword in CSS means the current size of
Im using the css friendly adapters from codeplex with sharepoint. It appears to be

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.