Gallery with Details Script

A Gallery Album of my Little Golden Books uploaded to Scribd.

This example use media queries to re-arrange the images on different screen sizes: for screens larger than 700px wide, it will show four images side by side, for screens smaller than 700px, it will show two images side by side. For screens smaller than 500px, the images will stack vertically (100%).


<style>

div.gallery {

  border: 1px solid #ccc;

}


div.gallery:hover {

  border: 1px solid #777;

}


div.gallery img {

  width: 100%;

  height: auto;

}


div.desc {

  padding: 15px;

  font-size: 12px;

  text-align: center;

}


* {

  box-sizing: border-box;

}


.responsive {

  padding: 0 6px;

  float: left;

  width: 24.99999%;

}


@media only screen and (max-width: 700px) {

  .responsive {

    width: 49.99999%;

    margin: 6px 0;

  }

}


@media only screen and (max-width: 500px) {

  .responsive {

    width: 100%;

  }

}


.clearfix:after {

  content: "";

  display: table;

  clear: both;

}

</style>


<h2>Responsive Image Gallery</h2>


<h4>Resize the browser window to see the effect.</h4>


<div class="responsive">

  <div class="gallery">

    <a target="_blank" href="img_LINK.jpg">

      <img src="img_LINK.jpg" alt="Cinque Terre">

    </a>

    <div class="desc">Add a description of the image here</div>

  </div>

</div>


<div class="responsive">

  <div class="gallery">

    <a target="_blank" href="img_LINK.jpg">

      <img src="img_LINK.jpg" alt="Cinque Terre">

    </a>

    <div class="desc">Add a description of the image here</div>

  </div>

</div>


<div class="clearfix"></div>

<div style="padding:6px;">

  <p>This example use media queries to re-arrange the images on different screen sizes: for screens larger than 700px wide, it will show four images side by side, for screens smaller than 700px, it will show two images side by side. For screens smaller than 500px, the images will stack vertically (100%).</p>

  <p>You will learn more about media queries and responsive web design later in our CSS Tutorial.</p>

</div>

Script Source: w3schools Image Source: InternetArchive


Thanks For Visiting
Copyright © 2018 - Creative eXpressions

Sources: ... FlipBook ... Scribed ... PDF
This Site is in no way apart of, with, or associated with The Walt Disney Company. Some content is Copyright © The Walt Disney Company. No parts of this site are to be reproduced without written permission. 
These books are for educational purposes only!! 
**FAIR USE** Copyright Disclaimer under section 107 of the Copyright Act 1976, allowance is made for “fair use” for purposes such as criticism, comment, news reporting, teaching, scholarship, education and research.