HTML CSS examples for CSS Widget:Table Cell
Make display table-cell use percentage width
<html> <head> <title>Lorem ipsum dolor sit </title> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .middle {<!--from w w w .j a v a 2 s . com--> display:table-cell; vertical-align:middle; height:201px; width:10001px; text-align:center; background:pink; } </style> </head> <body> <div class="middle"> <div> Lorem ipsum </div> </div> </body> </html>