Create a button with an image - HTML CSS CSS Form

HTML CSS examples for CSS Form:input image button

Description

Create a button with an image

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

.btn {<!--   ww  w  .j a  v  a2 s. c  o  m-->
   margin:10px;
   color:white;
   font-size:16px;
   border:4px solid #c5c7c9;
   border-radius: 50px 50px;
   display:inline-block;
   -webkit-box-shadow: 1px 1px 2px 0px rgba(50, 50, 50, 0.68);
   -moz-box-shadow:    1px 1px 2px 0px rgba(50, 50, 50, 0.68);
   box-shadow:         1px 1px 2px 0px rgba(50, 50, 50, 0.68);
   background: rgb(78,186,234); /* Old browsers */
   background: -moz-linear-gradient(left, blue 0%, rgba(0,121,183,1) 100%); /* FF3.6+ */
   background: -webkit-gradient(linear, left top, right top, color-stop(0%,blue), color-stop(100%,rgba(0,121,183,1))); /* Chrome,Safari4+ */
   background: -webkit-linear-gradient(left, blue 0%,rgba(0,121,183,1) 100%); /* Chrome10+,Safari5.1+ */
   background: -o-linear-gradient(left, blue 0%,rgba(0,121,183,1) 100%); /* Opera 11.10+ */
   background: -ms-linear-gradient(left, blue 0%,rgba(0,121,183,1) 100%); /* IE10+ */
   background: linear-gradient(to right, blue 0%,rgba(0,121,183,1) 100%); /* W3C */
   filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4ebaea', endColorstr='#0079b7',GradientType=1 ); /* IE6-9 */
}
.btn.large {  padding:30px 60px; }
.btn.small {   padding:10px 30px; }


      </style> 
 </head> 
 <body> 
  <h1>Buttons</h1> 
  <hr> 
  <a href="#" class="btn large">my text here</a> 
  <br> 
  <a href="#" class="btn small">my text here</a> 
  <a href="#" class="btn small">my text here long text goes here</a>  
 </body>
</html>

Related Tutorials