Learn HTML Forms by Building a Registration Form - Step 61

input[type=“submit”] {
display: block;
height: 2em;
font-size: 1.1rem;
background-color: #3b3b4f;
border-color: white;
min-width:300px;
margin:1em auto;

}

// chalenge
Lastly, for the submit button, you want to separate it from the fieldset above, and adjust its width to never be below 300px.

Change the margin property to include 1em on the top and bottom, while leaving the right and left margins set to auto. Then set the width as described above.

// Error …
Sorry, your code does not pass. Hang in there.

You should not change the width property. Use the min-width property.

Hi, just make sure you add back the original width value of 60%. So your submit button’s CSS will have the original width value of 60%, and the min-width value as well. (So it will not just specify to smallest possible width of the button, but also how wide it is compared to its containing block. So if you leave the 60% off, your button’s width will take up 100% of the line. You need the 60% to preserve the original look.

2 Likes