Responsive Image Gallery
15-05-2017    229 times
Responsive Image Gallery

Design a Responsive Image Gallery

Today’s web designing is not limited only for the desktop. All the designers should be very careful about the device in which your website may open. Most of the case users are open the website in the desktop but most advance users open the same site in their tab or mobile sets. But ordinary web pages are cannot scale itself into various devices. We must size all the elements in the page by the ratio of it container.

Tutorial at home

Here we create a simple photo gallery. This will open in every device with the same format.

Html Code

<html>
<head>
<title>Image Gallery</title>
<link rel="stylesheet" type="text/css" href="imgGallery.css">
</head>
<body>
<h1>Image Gallery</h1>
<div class="box"><img src="img1.jpg" width="100%"></div>
<div class="box"><img src="img1.jpg" width="100%"></div>
<div class="box"><img src="img1.jpg" width="100%"></div>
<div class="box"><img src="img1.jpg" width="100%"></div>
<div class="box"><img src="img1.jpg" width="100%"></div>

<div class="box"><img src="img1.jpg" width="100%"></div>
<div class="box"><img src="img1.jpg" width="100%"></div>
<div class="box"><img src="img1.jpg" width="100%"></div>
<div class="box"><img src="img1.jpg" width="100%"></div>
<div class="box"><img src="img1.jpg" width="100%"></div>
</body>
</html>

Tutorial at home

Css Code

*
{
box-sizing:border-box;
}

.box
{
width:20%;
padding:15px;
float:left;
border:1px solid black;
}

Video Tutorials

freenotes
    Author Details
Arnab De
I have over 16 years of experience working as an IT professional, ranging from teaching at my own institute to being a computer faculty at different leading institute across Kolkata. I also work as a web developer and designer, having worked for renowned companies and brand. Through tutorialathome, I wish to share my years of knowledge with the readers.
    Related Post
  Query About the post