bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/CSS/CSS Foundations Practice
CSS•CSS Foundations Practice

CSS Link Buttons

Overview

CSS can be used to create HTML link buttons:

Link Button

Link Button

Example

Formula

Combine several CSS properties to display links as boxes/buttons a:link, a:visited {
background-color: #f44336;
color: white;
padding: 14px 25px;
text-align: center;
text-decoration: none;
display: inline-block;
}
a:hover, a:active {
background-color: red;
}

Example

Formula

Another example of how to create link boxes/buttons:
a:link, a:visited {
background-color: white;
color: black;
border: 2px solid green;
padding: 10px 20px;

Formula

text - align:
center;
text-decoration: none;
display: inline-block;
}

a:hover, a:active

{
background-color: green;
color: white;
}

Previous

CSS Links

Next

CSS Links Code Challenge