Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

select all text boxes in css

Is there a way in CSS to select all input elements of type text?

like image 258
Mild Fuzz Avatar asked Apr 26 '11 12:04

Mild Fuzz


People also ask

How do you select all text input in CSS?

The HTMLInputElement. select() method selects all the text in a <textarea> element or in an <input> element that includes a text field.

How do I select a textbox in CSS?

CSS attribute selector is used to targeting an input text fields. The input text fields of type 'text' can be targeting by using input[type=text].

How do you select text in HTML?

The select() method is used to select the content of a text field.


1 Answers

input[type=text]
{
  //css rules
}

This requires CSS 2.1 and won't work in some older browsers (like IE6)

like image 53
Shakti Singh Avatar answered Sep 20 '22 12:09

Shakti Singh