HTML CSS examples for CSS Widget:Table Cell
Set display:table-cell and set height and overflow:hidden
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .table {<!-- ww w .j a v a2 s . c om--> display:table; table-layout:fixed; width:100%; height:201px; } .cell { display:table-cell; vertical-align:top; position:relative; height:201px; overflow:hidden; } .container { height:100px; background-color:Chartreuse; } .container img { display:block; } </style> </head> <body> <div class="table"> <div class="cell"> <div class="container"> <img src="https://www.java2s.com/style/demo/InternetExplorer.png"> <img src="https://www.java2s.com/style/demo/Safari.png"> <img src="https://www.java2s.com/style/demo/Safari.png"> </div> </div> </div> </body> </html>