Learning Challenge
Question
What causes the Add user font to appear bold or larger in this code?
Also what causes the Add user underline to underline the whole top section?
fieldset {
/* Get rid of the border on the fieldset. */
border: 0;
}
form {
/* Center the form on the page. */
margin: 0 auto;
width: 600px;
/* Curved border around the form. */
padding: 1em;
border: 1px solid #CCC;
border-radius: 1em;
/* Make all the fonts in the form the same. */
font-family: Arial, Helvetica, sans-serif;
}
/* Every div after the first div in the form. */
form div + div {
margin-top: 1em;
}
label {
/* Uniform size & alignment for labels. */
display: inline-block;
width: 90px;
text-align: right;
}
legend {
/* Add a bottom border to the legend. */
border-bottom: 1px solid black;
}
input,
textarea {
/* You must explicitly override the fonts in textareas and inputs. */
font-family: Arial, Helvetica, sans-serif;
/* Uniform text field and textarea sizes. */
width: 425px;
box-sizing: border-box;
/* Match form field borders */
border: 1px solid #999;
}
input:focus,
textarea:focus {
/* Additional highlight for focused elements */
border-color: #000;
}
textarea {
/* Align multiline text fields with their labels */
vertical-align: top;
/* Provide space to type some text */
height: 5em;
}
select {
/* You must explicitly override the font in a select. */
font-family: Arial, Helvetica, sans-serif;
/* Make the select as wide as the other form elements. */
width: 425px;
}
button {
/* Space the button to the right. */
margin-left: .5em;
}
What I’ve tried
I’ve typed the code by hand, even tried copy and pasting. And my add user is still the same font and size as all the other fonts. I’m just trying to understand the basics.
Screenshots
What mine looks like