Image and text in a single line in button - HTML CSS CSS Form

HTML CSS examples for CSS Form:input button text

Description

Image and text in a single line in button

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">

img.del {
   display: inline-block;
   cursor: pointer;
   margin-left: 10px;
   margin-right: 5%;
   position: relative;
}
.astext {<!--from w w w.ja  v  a  2  s .  co m-->
   display: inline-block;
   text-align: left;
   margin-left: 10%;
}
button {
   width: 80px;
}


      </style> 
 </head> 
 <body> 
  <button> <span class="astext"> Next </span> <img src="https://www.java2s.com/style/demo/Firefox.png" class="del" style="width:10px;height:10px"> </button>  
 </body>
</html>

Related Tutorials