There are a lot of different buttons that can be used within a User Interface. The design of these buttons can range anything from default butoon to block, icon, ghost, various size, different colour etc.
1. Default Buttons
Submit Save Add
HTML and CSS Code
HTML Code
Submit
Save
Add
CSS Code
.button {
background-color: #FF9966;
color: #333333;
text-align:center;
font-size: 15px;
font-weight: bold;
height: 40px;
width: 100px;
border: none;
border-radius: 10px;
}
.button:hover {
background-color: #FFAA80;
transition: 0.2s;
}
2. Various Size Buttons
.fullwidth
.small
HTML and CSS Code
HTML Code
.fullwidth
.small
CSS Code
.fullwidth {
background-color: #FF9966;
color: #333333;
text-align:center;
font-size: 15px;
font-weight: bold;
height: 40px;
width: 100%;
border: none;
border-radius: 10px;
}
.fullwidth:hover {
background-color: #FFAA80;
transition: 0.2s;
}
.small {
background-color: #FF9966;
color: #333333;
text-align:center;
font-size: 15px;
font-weight: bold;
height: 30px;
width: 80px;
border: none;
border-radius: 10px;
}
.small:hover {
background-color: #FFAA80;
transition: 0.2s;
}
.extrasmall {
background-color: #FF9966;
color: #333333;
text-align:center;
font-size: 10px;
font-weight: bold;
height: 20px;
width: 60px;
border: none;
border-radius: 10px;
}
.extrasmall:hover {
background-color: #FFAA80;
transition: 0.2s;
}
3. Ghost Button
.ghostbutton
.ghostbutton
.ghostbutton
HTML and CSS Code
HTML Code
.ghostbutton
.ghostbutton
.ghostbutton
CSS Code
.ghostbutton {
width: 100px;
height: 40px;
color: #333333;
border: none;
border-radius: 10px;
font-weight: bold;
text-align: center;
outline: none;
background-color: white;
}
.ghostbutton:hover {
background-color: #FFAA80;
transition: 0.2s;
}
4. Coloured Buttons
.redbutton
.greenbutton
.darkgreybutton
HTML and CSS Code
HTML Code
.red
.green
.darkgrey
CSS Code
.redbutton {
width: 100px;
height: 40px;
color: #FFFFFF;
border: none;
border-radius: 10px;
font-weight: bold;
text-align: center;
outline: none;
background-color: #FF4D4D;
}
.redbutton:hover {
background-color: #FF8080;
transition: 0.2s;
}
.greenbutton {
width: 100px;
height: 40px;
color: #333333;
border: none;
border-radius: 10px;
font-weight: bold;
text-align: center;
outline: none;
background-color: #4DFF4D;
}
.greenbutton:hover {
background-color: #80FF80;
transition: 0.2s;
}
.darkgreybutton {
width: 100px;
height: 40px;
color: #FFFFFF;
border: none;
border-radius: 10px;
font-weight: bold;
text-align: center;
outline: none;
background-color: #333333;
}
.darkgreybutton:hover {
background-color: #4D4D4D;
transition: 0.2s;
}
5. Icon Buttons
Home
Settings
Search
HTML and CSS Code
HTML Code
Link Icons in .
Home
Settings
Search
CSS Code
.icon {
background-color: #FF9966;
color: #333333;
text-align:center;
font-size: 15px;
font-weight: bold;
height: 40px;
width: 150px;
border: none;
border-radius: 10px;
}
.icon:hover {
background-color: #FFAA80;
transition: 0.2s;
}
6. Active/Disabled Buttons
Active
.buttondisabled
HTML and CSS Code
HTML Code
Link Icons in .
Active
.buttondisabled
CSS Code
.buttondisabled {
background-color: #999999;
color: #333333;
text-align:center;
font-size: 15px;
font-weight: bold;
height: 40px;
width: 150px;
border: none;
border-radius: 10px;
}