HTML CSS examples for CSS Widget:Table Width
Use width:100% to make a table expand relative to window size
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .table {<!--from ww w .j a v a2 s . com--> display:table; margin-right:auto; margin-left:auto; width:100%; } .tablecell { display:table-cell; text-align:center; } </style> </head> <body> <div class="table"> <div class="tablecell"> <img src="https://www.java2s.com/style/demo/Opera.png"> </div> <div class="tablecell"> <img src="https://www.java2s.com/style/demo/Safari.png"> </div> <div class="tablecell"> <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> </div> <div class="tablecell"> <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> </div> <div class="tablecell"> <img src="https://www.java2s.com/style/demo/Firefox.png"> </div> </div> </body> </html>