Add a bit of Style
Let's start styling it up a bit!!!
HTML forms can further be styled up and look prettier with the help of some basic CSS knowledge.
The width property can determine the width of the input field :
input {
width: 100%;
}
You can also determine the length of a specific type of input by using attribute selectors.
The padding property can be used to add space inside the text field.
input[type=text] {
width: 100%;
padding: 12px 20px;
box-sizing: border-box;
}
The background-color property can be used to add a background colour to the input and colour property can be used to change the colour of the text.
input[type=text] {
background-color: #3CBC8D;
color: white;
}
6
