Forum Moderators: not2easy
<!DOCTYPE html>
<html lang="en">
<head>
<base href="https://www.webmasterworld.com/gfx/">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0">
<title>Responsive gallery</title>
<style>
#gallery-wrapper{
width:95%;
padding:0;
margin:10px auto;
list-style-type:none;
}
#gallery-wrapper li {
display:inline-block;
width:32%;
margin:10px 0.666%;
text-align:center;
}
#gallery-wrapper li a {
color:#000;
text-decoration:none;
}
#gallery-wrapper li img {
width:100%;
height:auto;
border:0;
}
</style>
</head>
<body>
<ul id="gallery-wrapper">
<li>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</li><li>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</li><li>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</li><li>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</li><li>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</li><li>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</li><li>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</li><li>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</li><li>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</li>
</ul>
</body>
</html>
Before I change everything over to a list format I would like to try to get divs to work.
<!DOCTYPE html>
<html lang="en">
<head>
<base href="https://www.webmasterworld.com/gfx/">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0">
<title>Responsive gallery</title>
<style>
#gallery-wrapper{
width:95%;
padding:0;
margin:10px auto;
list-style-type:none;
}
#gallery-wrapper div {
display:inline-block;
width:32%;
margin:10px 0.666%;
text-align:center;
}
#gallery-wrapper div a {
color:#000;
text-decoration:none;
}
#gallery-wrapper div img {
width:100%;
height:auto;
border:0;
}
</style>
</head>
<body>
<div id="gallery-wrapper">
<div>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</div><div>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</div><div>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</div><div>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</div><div>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</div><div>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</div><div>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</div><div>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</div><div>
<a href="failure-to-communicate.jpg" target="blank">
<img src="failure-to-communicate.jpg" alt="" width="757" height="439">
Name of image.</a>
</div>
</div>
</body>
</html>