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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:18:40+00:00 2026-06-14T13:18:40+00:00

According to the specification here: http://www.w3.org/TR/CSS21/selector.html#adjacent-selectors Adjacent sibling selectors have the following syntax: E1

  • 0

According to the specification here: http://www.w3.org/TR/CSS21/selector.html#adjacent-selectors

Adjacent sibling selectors have the following syntax: E1 + E2, where
E2 is the subject of the selector. The selector matches if E1 and E2
share the same parent in the document tree and E1 immediately precedes
E2, ignoring non-element nodes (such as text nodes and comments).

So how can we select the non-element sibling node. For example: in the following html, how can we select the “Non-element text” text?

<div><label>Some text here</label> Non-element text</div>
  • 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-14T13:18:42+00:00Added an answer on June 14, 2026 at 1:18 pm

    You can’t. CSS selectors can only select element nodes. This is why the adjacent sibling combinator works as described.

    If you need to apply styles, try applying them to the div and overriding them in the label. This does depend on what styles you’re applying, of course, since some of the styles can’t be undone or are subject to inheritance.

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

Sidebar

Related Questions

According to the specification on http://dev.w3.org/html5/2dcontext/#dom-context-2d-globalcompositeoperation , the lighter composition is A plus B.
I understand that according to the HTML specification, it's invalid to add custom attributes
<ol style=padding-top:0;> <li><a href=http://www.24hourfitness.com/membership/offers/specials.html?cm_mmc=Silverfox-_-SEM-_-Google-_-Branded?>24 Hour Fitness</a></li> <!-- open nested list --> <ul> <li>This website
I have implemented UIApplicationDelegate's application:didFinishLaunchingWithOptions: and application:handleOpenURL: according to specification, i.e., application:didFinishLaunchingWithOptions: returns YES
According to the C++ specification, are the following two classes equivalently defined? class A
According to the DCPU specification , the only time a SET instruction fails is
According to the C++11 standard, is the following program well-formed and portable C++? int
According to the specification, Black colour blocks and the edges of the program restrict
According W3C XML specification, element is declared in form of : [45] elementdecl ::=
I've got a strange problem with pthread_cond_timedwait(): according to the POSIX specification it is

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.