css button vertical align center code example

Example: how to align buttons vertically in html

<style>/*The Css Code*/
  #test {
    vertical-align: top/middle/bottom; /*your choice*/
  }
  button {
    display: block;/*will place the buttons on seperate lines*/
  }
</style>

<!--The Html Code-->
<div id="test"><!--In order to align buttons you need a container div (or any parent element) with the apropriate style-->
  <button>Button 1</button>
  <button>Button 2</button>
  <button>Button 3</button>
</div>

Tags:

Html Example