Suraj
Suraj

Reputation: 2563

Give styling to the input's entered text html

I have a code snippet like below.

.place_class input[type="text"] {
  Line-height: 40px;
  float: left;
  height: 45px;
  outline: none;
  background-color: transparent;
  text-align: left;
  width: 73%;
  color: #000;
  border: 0px;
  font-size: 15px;
}
<input type="text" class="place_class" rows="4" cols="50" name="comment" form="usrform">

This for some reason doesn't seem to work..

Is this correct?

Upvotes: 0

Views: 39

Answers (3)

Carl Binalla
Carl Binalla

Reputation: 5411

Try this

.place_class {
  line-height: 40px;
  float: left;
  height: 45px;
  outline: none;
  background-color: transparent;
  text-align: left;
  width: 73%;
  color: #000;
  border: none;
  font-size: 15px;
}   
<input type="text" class="place_class" rows="4" cols="50" name="comment" form="usrform">

Upvotes: 0

amansoni211
amansoni211

Reputation: 929

.place_class input[type="text"] { // here you need to remove class .place_class
  Line-height: 40px;
  float: left;
  ....
}

Check this example

Upvotes: 0

Weppy
Weppy

Reputation: 395

Replace .place_class input[type="text"] with input[type="text"].place_class

Also Line-height should be line-height

Upvotes: 1

Related Questions