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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:47:56+00:00 2026-05-24T08:47:56+00:00

I want to apply a attribute to all input[type=text] elements but exclude certain elements.

  • 0

I want to apply a attribute to all input[type=text] elements but exclude certain elements.
The elements to exclude does not have any class but their parent parent does.

The HTML looks like

<tr class="filters">
    <td>
        <input type="text" name="aName">
    </td>
    <td>
        <input type="text" name="anotherName">
    </td>
        ...
</tr>

I tried this CSS:

input[type=text]:not(tr.filters > td > input[type=text])
{
    min-width:400px;
}

but it does not work.
Is it not possible to use not() in this way?

  • 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-24T08:47:57+00:00Added an answer on May 24, 2026 at 8:47 am

    It’s not possible with :not() as a CSS selector. The :not() pseudo-class accepts only a simple selector (which means exactly one type, .class, #id, [attribute] or :pseudo-class selector). Combinators like , > and + aren’t allowed.

    The default value of min-width is zero, so you can simply use an overriding rule instead and set it to that:

    input[type="text"] {
        min-width: 400px;
    }
    
    tr.filters > td > input[type="text"] {
        min-width: 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to find all the elements on my page that have a 'name'
How can i apply jquery on all elements with same id attribute ? i
I have a custom attribute that I want to apply to each methods in
Does anyone know whether a DOM Node of type Text is guaranteed not be
I want to be able to apply an attribute to an interface so that
I've got a custom attribute that I want to apply to my base abstract
I want to apply a function to all columns in a matrix with MATLAB.
I want to apply NTFS-Search to our project. Our project have to find the
I want to apply some CSS to text that I can't get marked up
I want to check if all children has an attribute set, and if so

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.