Home css Decoration Input type = “text”

Decoration Input type = “text”




Hello, is it possible to change the appearance of the input text field?
If possible, nudge in the desired direction.

I looked in Googl, I couldn’t find anything intelligible.

Answer 1, authority 100%

It would be better to consider everything

input [type = "text"] {
  border: 1px solid #cccccc; // border color
  border-radius: 3px; // rounding corners (general)
  -webkit-border-radius: 3px; // round corners (Google Chrome)
  -moz-border-radius: 3px; // rounding corners (FireFox)
  -khtml-border-radius: 3px; // round corners (Safari)
  background: #ffffff! important; // it is desirable to register, since in Chrome, when saving data, it can be yellow
  outline: none; // removes stroke in chrome (yellow) and safari (blue) browsers
  height: 24px; // height at your discretion
  width: 120px; // width at your discretion
  color: #cccccc; // font color in normal state
  font-size: 11px; // Font size
  font-family: Tahoma; // Font style

You can also add style when clicking (focusing) on ​​the field

input [type = "text"]: focus {
 color: # 000000;
 border: 1px solid # 000000


input [type = "text"]

not necessarily just


Answer 2, authority 21%

For all Input with type = “text”


input [type = "text"] {
  border: 1px solid black;
  border-radius: 5px;

Answer 3, authority 17%

You can. In css, you write the style, and assign the desired class to the input.
Here’s an example from the DLE admin area.

. edit {
  border: 1px solid # 9E9E9E;
  color: # 000000;
  padding: 3px;
  margin-top: 2px;
  margin-bottom: 2px;
  font-size: 11px;
  font-family: Verdana;
  background: #FFF;
.bk {
  background: #fff url (images / shadow.png) repeat-x;

Well, you write to input ‘:

& lt; input class = "edit bk" type = "text" name = "ololo" & gt;

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions