Centering buttons using CSS - HTML CSS CSS Form

HTML CSS examples for CSS Form:input button layout

Description

Centering buttons using CSS

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

.button3 {<!-- w  ww. ja va2  s . c  om-->
   width:100px;
   margin: 0 auto;
   display: block;
}


      </style> 
 </head> 
 <body> 
  <title>website</title> 
  <input type="button" value="Button" class="button3">  
 </body>
</html>

Related Tutorials