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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:30:53+00:00 2026-06-11T08:30:53+00:00

I need to set it with CSS, not jquery. The selector is for all

  • 0

I need to set it with CSS, not jquery.

The selector is for

all labels which do not have a sibling that is a checkbox or radio component.

a sample is:

<span>
  <input id="item" type="checkbox">
  <label for="item">Data</label>
</span>

This is because i have CSS which sets label to 12px, BUT it affects asp:checkboxes and asp:radio…, but i do not want them to be affected.

  • 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-11T08:30:54+00:00Added an answer on June 11, 2026 at 8:30 am

    There isn’t a CSS selector for an element that doesn’t have a sibling of a certain kind.

    But if you can guarantee that your structure is always an input followed by a label, then you could use the next-sibling combinator with :not() like so to match the label:

    input:not([type="checkbox"]):not([type="radio"]) + label
    

    Otherwise you’re going to have to add classes to those labels, or use jQuery.

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

Sidebar

Related Questions

In Javascript/JQuery I have a need to copy one elements CSS style object to
I'm trying to use jQuery to show an image that I have set to
I need to set the default icon that VS uses for the project to
So in jQuery, I have a global variable currentSubNav that stores a current visible
I have an Android application that generates some HTML which is rendered locally, in
i'm having troubles configuring the autocomplete module of JQuery-UI. I need that when the
I've just discovered the fullCalendar jQuery plugin which does pretty much everything I need
I have a 1 second jQuery .animate action that launches 5 seconds after page
Right... I need to find all < ul style=display: block;> elements, so that I
TL;DR: I'm using jQuery .css() to set the background color of an element, but

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.