HTML CSS examples for CSS Widget:Table Cell
"display table-cell" for div
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> body {<!-- ww w .j a v a 2 s . c o m--> padding:51px; } .toolbar { border:2px solid Chartreuse; border-width:2px 0; display:table; width:100%; } .toolbar button, .toolbar div { -moz-box-sizing:border-box; } .toolbar .item { background:transparent; border:2px solid yellow; border-width:0 2px 0 0; display:table-cell; vertical-align:center; white-space:nowrap; } .toolbar .item:last-child { border-right:0; } .toolbar .item button { height:41px; outline:none; padding:0; margin:0; width:100%; } </style> </head> <body> <div class="toolbar"> <div class="item"> <button type="button">Lorem </button> </div> <div class="item"> <button type="button">Lorem </button> </div> <div class="item"> Lorem ip </div> <div class="item"> Lorem ip </div> </div> </body> </html>