HTML CSS examples for CSS Widget:Table Cell
center checkbox vertically in a table-cell
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .category-item {<!--from w w w. j a va2s . c o m--> display:table; border:2px solid Chartreuse; margin:0; padding:0; height:51px; } .category-item .input-container { display:table-cell; margin:0; padding:0; text-align:center; vertical-align:middle; } .category-item .input-container input { margin:0; padding:0; } </style> </head> <body> <div class="category-item"> <span class="input-container"> <input type="checkbox"> </span> </div> </body> </html>