Locked lesson.
About this lesson
Exercise files
Download this lesson’s related exercise files.
Buttons.docx58.9 KB Buttons - Solution.docx
59.2 KB
Quick reference
Buttons
In this videos we'll learn how to style buttons with CSS.
When to use
Any time you have a fill out form with a button, you can use this CSS.
Instructions
To create a button class:
.button {
background-color: blue;
border: none;
color: white;
padding: 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 20px;
margin: 5px;
cursor: pointer;
}
To create a button, you could add that button class to a link, or add that button class to a form button that already exists.
Hints & tips
- You can create buttons two ways, with links or with form buttons
- The best way is probably to simply add a button class to your pre-existing form button.
Lesson notes are only available for subscribers.