HTML and CSS Reference
In-Depth Information
styles—including
weight
,
size
,
line-height
, and
family
—for all of the
<input>
,
<select>
, and <
textarea>
elements.
By default, every browser has its own interpretation of how the styles for form
controls should appear. With this in mind, we have repeated the
font
-based styles
from our
<body>
element to ensure that our styles remain consistent.
8.
Let's add some styles to the elements within the
<fieldset>
element. Since we
may add additional
<fieldset>
elements later on, let's add a class attribute
value of
register-group
to our existing
<fieldset>
element, and from
there we can apply unique styles to the elements nested within it.
1.
<fieldset
class="register-group"
>
2.
...
3.
</fieldset>
Once the
register-group
class attribute value is in place, we'll add a few
styles to the elements nested within the
<fieldset>
element. These styles will
appear in our
main.css
file, below the existing form styles.
1.
.register-group label {
2.
color: #648880;
3.
cursor: pointer;
4.
font-weight: 400;
5.
}
6.
.register-group input,
7.
.register-group select,
8.
.register-group textarea {
9.
border: 1px solid #c6c9cc;
10.
border-radius: 5px;
11.
color: #888;
12.
display: block;
13.
margin: 5px 0 27px 0;
14.
padding: 5px 8px;
15.
}
16.
.register-group input,
17.
.register-group textarea {
18.
width: 100%;
19.
}
20.
.register-group select {
21.
height: 34px;
22.
width: 60px;
23.
}
24.
.register-group textarea {
25.
height: 78px;
Search WWH ::
Custom Search