Button like Links using CSS

In this tutorial we will see how to create Button like Links using CSS. CSS box-shadow property is the main property used in this code to create button like links.

HTML Code

Simple HTML Code is given below, In this code we have a main ul tag which has three list items and inside those list items we have our main links. We will turn these links into buttons using simple CSS.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Button like Links using CSS</title>
</head>
<body>
<nav>
<ul>
<li><a href='#'>HOME</a></li>
<li><a href='#'>HTML</a></li>
<li><a href='#'>CSS</a></li>    
</ul>    
</nav>
</body>
</html>

CSS Code

CSS code is given below, In this code CSS box-shadow property is used to create the button like effect on the links. The CSS code of body tag is optional, it's only used to center align the nav tag, both vertically and horizontally.

* {
margin: 0;
padding: 0;
font-family: calibri, sans-serif; }
body {
background-color: #ccc;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
}
ul li {
display: inline-block;
margin:0px 5px;
}
ul li a {
color:#fff;
background-color: #1A73E8;
padding:10px;
box-shadow: 2px 2px 0px 5px #0C5DC7;
font-size: 20px;
text-decoration:none;    
}
ul li a:hover {
background-color:#1164D1;
}

Demo

Video Tutorial

Watch video tutorial on Button like Links using CSS.

Responsive Sidebar Menu with CSS and JavaScript Cool CSS Button with Hover Animation Pure CSS Custom Radio Buttons Custom Emoji Radio Buttons with CSS Color Picker Design with HTML CSS and JavaScript Custom Radio Buttons with CSS Engraved HTML Buttons With CSS Neumorphic Buttons Design with CSS Cool Profile Card Design with HTML CSS Neumorphic Search Bar Design with HTML and CSS Simple Login Form with Placeholder Animation Pure CSS Button with Folded Corner Background Color Change Slider with HTML CSS and JavaScript 404 Page Not Found Template Design with HTML and CSS Movies Blog Card Design with HTML and CSS Simple CSS Border Animation with before and after Selector Custom Social Select Dropdown Menu with CSS and JavaScript Facebook Offline and Online Notification with CSS and JS New Year 2022 Text Animation with CSS and JS Change Placeholder Color using CSS Custom Select Tag DropDown with CSS and JavaScript Simple Price Range Slider With HTML CSS and JavaScript Profile Card With Hover Effect using HTML and CSS Circle With Two Colors using CSS Simple FAQ Accordion With HTML CSS and JavaScript