HTML CSS examples for CSS Layout:Flex Container
Overflow with a flex
<html lang="en"> <head> <style> .wrapper {<!-- w w w . j a va2 s .c o m--> border: 1px solid red; width: 400px; height: 200px; display: flex; overflow: hidden; } .box { border: 1px solid green; max-width: 33.33333%; box-sizing: border-box; position: relative; padding-right: 10px; align-self: center; } </style> </head> <body translate="no"> <div class="wrapper"> <img class="box" src="https://www.java2s.com/style/demo/Opera.png"> <img class="box" src="https://www.java2s.com/style/demo/InternetExplorer.png"> <img class="box" src="https://www.java2s.com/style/demo/Safari.png"> <img class="box" src="https://www.java2s.com/style/demo/Google-Chrome.png"> <img class="box" src="https://www.java2s.com/style/demo/InternetExplorer.png"> </div> </body> </html>