HTML CSS examples for CSS Widget:Image
Creating a responsive grid, stacks, with responsive images
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #content {<!--from www . j a va 2 s . co m--> width:91%; margin-top:61px; margin-left:6%; margin-right:6%; } .product img { max-width:100%; } body { background-color:Chartreuse; } .product { width:51%; display:block; float:left; } @media screen and (min-width:450px) { .product { width:34.4%; display:block; float:left; } } </style> </head> <body> <div id="content"> <div class="product"> <img src="https://www.java2s.com/style/demo/Opera.png"> </div> <div class="product"> <img src="https://www.java2s.com/style/demo/Opera.png"> </div> <div class="product"> <img src="https://www.java2s.com/style/demo/Opera.png"> </div> <div class="product"> <img src="https://www.java2s.com/style/demo/Safari.png"> </div> <div class="product"> <img src="https://www.java2s.com/style/demo/Firefox.png"> </div> <div class="product"> <img src="https://www.java2s.com/style/demo/Opera.png"> </div> </div> </body> </html>