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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:32:03+00:00 2026-05-30T18:32:03+00:00

Given these HTML inputs of differing types : <input type=text id=username /> <input type=email

  • 0

Given these HTML inputs of differing types:

<input type="text" id="username" />
<input type="email" id="emailaddress" />
<input type="date" id="birthday" />
<input type="password" id="pword" />
<input type="search" id="q" />

Is it possible to apply CSS styles to all text boxes without having to either add a class to each or selecting them like this:

input[type="text"],
input[type="email"],
input[type="date"],
input[type="password"],
input[type="search"]
...

Also I don’t want to use input { } as that would select radio buttons etc. when I only want to style are the text boxes.

  • 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-30T18:32:04+00:00Added an answer on May 30, 2026 at 6:32 pm

    I don’t think this is possible. For instance, it’s up to the browser to decide how an input is rendered. There’s no way to query how the browser has rendered a control (as far as I know).
    For example, some browsers will render a ‘range’ input as as textbox rather than a slider. Also some browsers render the ‘search’ control differently to other text boxes (rounded corners etc), so your CSS may not work as you expect anyway.

    I think you’ll have to go for the input[type=”text”], input=[type=”password”] { } rules as you described.

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

Sidebar

Related Questions

given this html input element, <input id=input1 type=text /> if the user enters a
Given the following html <label for=inputelement>label</label> <input type=text id=inputelement name=inputelement /> You can style
Given the following HTML fragment: <span name=foo class=foo-class> <input name=foo value=0 id=foo2_0 type=radio> <label
Consider the following HTML table: <table id=myTable1> <tr id=TR1> <td><input type=text id=quantity1 name=quantity1 /></td>
Two jQuery questions: 1) Given this HTML structure <div id=tipper class=tiplink><a href='test.html' >Link Text</a>
I have two html text input fields and two buttons. The first button saves
Why is there a reported difference in element heights given the following html? <span
Given these two queries: Select t1.id, t2.companyName from table1 t1 INNER JOIN table2 t2
Given these tables: create table Orders ( Id INT IDENTITY NOT NULL, primary key
This is easier to explain with an example. Given these two classes: public class

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.