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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:07:07+00:00 2026-05-23T12:07:07+00:00

What are the CSS selectors (for e.g., + ) and how do we use

  • 0

What are the CSS selectors (for e.g., +) and how do we use them? Is there a list of all the selectors? Links to relevant sources will do.

  • 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-23T12:07:07+00:00Added an answer on May 23, 2026 at 12:07 pm

    In the CSS specifiction (here CSS 2.1), section 5 Selectors.

    Specifically, the + is called adjacent sibling selector:

    5.7 Adjacent sibling 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).

    Thus, the following rule states that when a P element immediately follows a MATH element, it should not be indented:

    math + p { text-indent: 0 } 
    

    The next example reduces the vertical space separating an H1 and an H2 that immediately follows it:

    h1 + h2 { margin-top: -5mm }   
    

    The following rule is similar to the one in the previous example, except that it adds a class selector. Thus, special formatting only occurs when H1 has class=”opener”:

    h1.opener + h2 { margin-top: -5mm }   
    

    You might also be interested in CSS 3 selectors.

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

Sidebar

Related Questions

How would I, using Deliverance & XPath (or CSS) selectors, select and copy list
Is it possible to use the noscript element in CSS selectors? noscript p {
How can I use CSS selectors to apply a style only to the inner
Every page on my site has multiple body classes that I use CSS selectors
To what extend should I be attempting to use other CSS selectors instead of
I would like to use a css selector to get only the th tags
I'm using CSS selectors to generate custom pop-ups for a web templates - basically,
I am trying to read CSS selectors in my stylesheets with the document.styleSheets array.
What are the best practices when naming CSS selectors? SomeContainerContent some_container_content some-container-content I read
CSS Attribute selectors allow the selection of elements based on attribute values. Unfortunately, I've

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.