Center a submit button div - HTML CSS CSS Form

HTML CSS examples for CSS Form:input submit

Description

Center a submit button div

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

.outer {<!--from   w  w  w  .  ja  v a 2 s. c om-->
   text-align: center;
   margin: auto;
   width: 200px;
}
/* BUTTONS */
.buttons button{
   cursor: pointer;
   cursor: hand;
   border: 0;
   height: 28px;
   float: left;
   text-indent: 4px;
   text-decoration:none;
   font-weight: bold;
   text-transform: uppercase;
   font-size: 1.2em;
   background: url(https://www.java2s.com/style/demo/InternetExplorer.png);
}
.buttons span{ /* Right-hand corner */
cursor: pointer;
cursor: hand;
display: block;
width: 5px;
height: 28px;
float: left;
background: url(https://www.java2s.com/style/demo/InternetExplorer.png) top right;
}


      </style> 
 </head> 
 <body> 
  <div class="outer"> 
   <div class="buttons"> 
    <button type="submit">SUBMIT</button> 
    <span></span> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials