You don't need multiple divs , check out JSFiddle , this is the only DIV that looks and behaves like a button.
HTML:
<div class='btn'>
this looks like a button
</div>
CSS:
.btn{
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
text-decoration: none;
color: #333;
background-color: #fff;
border-color: #ccc;
}
If you want the button to really refer to something (behave like a link), just change your HTML to this:
<a href='test.html' class='btn'>
this looks like a button
</a>
If you use bootstrap , you do not need to define the .btn class included in it.
source
share