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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:27:37+00:00 2026-06-13T05:27:37+00:00

Hi I would like to target and modify the <label> tag only when is

  • 0

Hi I would like to target and modify the <label> tag only when is next to a input[type=radio], no in any other cirscuntances.

My code looks like this:

<fieldset>
  <legend>Some legend</legend>
  <p>Some explanation</p>
  <label>
   <input type="radio" name="#{name}" value="#{value}" />
  </label>
</fieldset>

I tryied with fieldset label:first-child+input[type=radio]{} but doenst work, if someone can help me would be awesome.

EDIT:
What I want is to be able to style only the LABEL tag no the RADIO button INPUT tag, and this style will apply only when <label><input type="radio"></label> structure is found.

  • 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-13T05:27:38+00:00Added an answer on June 13, 2026 at 5:27 am

    What you are asking for is not possible in CSS. It is not possible to traverse “back” or “up” the DOM tree (so you can’t target previous siblings or parent nodes).

    See this post: Is there a CSS parent selector?

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

Sidebar

Related Questions

I am developing an Android app in Eclipse. I would like to target a
I would like to change the target of symbolic link from within a bash
In specializing a class template, I would like to have one specialization target full-blown
I'm developing my Android app with target set to 15, but would still like
I would like to create a table which has column like title,target and I
I would like trigger the drag target control to redraw itself (via either invalidate
I would like to target both .NET 3.5 and .NET 4.0 in my Visual
We would like to use some of our existing Java AWT graphics code on
I would like to modify text in a document that is in the form
When generating VS2010 targets with CMake, I would like the /LTCG flag turned on

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.