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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:18:21+00:00 2026-06-05T02:18:21+00:00

Is there a way with CSS3 to select every input-related element that does not

  • 0

Is there a way with CSS3 to select every input-related element that does not have a type attribute of button, reset, submit, or a tag of button? This is what I’ve gotten so far:

input:not([type="submit"]),
textarea {

    /* ... */

}

input:not([type="submit"]):focus,
textarea:focus {

    /* ... */

}

input:not([type="submit"]):hover,
textarea:hover {

    /* ... */

}

… but it’s not as universal as it could be. I’m wanting to apply some nice new transitions to solely input-related fields. If these certain styles get applied to any buttons on the page, it begins to look strange. Any help is appreciated.

  • 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-05T02:18:23+00:00Added an answer on June 5, 2026 at 2:18 am

    Simply chain multiple :not selectors together:

    /* Fields */
    input:not([type=button]):not([type=reset]):not([type=submit]):not([type=image]),
    textarea {
      outline: 3px solid green;
    }
    
    /* Buttons */
    input[type=button],
    input[type=reset],
    input[type=submit],
    input[type=image],
    button {
      outline: 3px solid red;
    }
    
    /* Both */
    input,
    button,
    textarea {
      margin: 6px;
    }
    <h1>Form elements</h1>
    <p>Buttons should be outlined in red, fields in green.</p>
    <button>Button</button>
    <input type="button" value="Input Button">
    <input type="checkbox">
    <input type="color">
    <input type="date">
    <input type="datetime-local">
    <input type="email">
    <input type="file">
    <input type="hidden">
    <input type="image" src="//placehold.it/100x40/ffff00/0000ff/?text=foo">
    <input type="month">
    <input type="number">
    <input type="password">
    <input type="radio">
    <input type="range">
    <input type="reset">
    <input type="search">
    <input type="submit">
    <input type="tel">
    <input type="text">
    <input type="time">
    <input type="url">
    <input type="week">
    <textarea></textarea>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to have CSS3 transitions/animations for a div that's just been
have span that may or may not have text content. is there a way
Is there a way with Javascript or CSS3 to have the left and right
Using current CSS and not CSS3, is there any way of specifying a raised
Why does the CSS3 pseudo-element selection not change all parts of the highlight? As
Is there way that I can read the file from remote server using fopen
I was wondering if there is any way in CSS3 to style links pointing
Is there a way to add transparency to a background-image using CSS3?
Is there a way to do an inverted rounded corner in CSS3, something approximately
Is there a way to take a DIV that has a background image 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.