Responsive Image Grid with set Height
How do I make an responsive image grid with set height?
Responsive image grid which keeps a persistant height.. What is a responsive image grid with set height? How do you make a responsive image grid with set height? This script and codes were developed by Richard on 02 August 2022, Tuesday.
Responsive Image Grid with set Height - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Responsive Image Grid with set Height</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <!-- Images sourced from Wikimedia Commons http://commons.wikimedia.org/wiki/Main_page -->
<div class="imageGridPercentage"> <div class="tile" style="background-image: url('http://bit.ly/1teOEsr');"> <div class="textWrapper"><h2>Pavlovsk Park, Saint Petersburg</h2> <div class="content">Temple of Friendship in Pavlovsk Park in Saint Petersburg.</div> </div> </div><!--
--><div class="tile" style="background-image: url('http://bit.ly/1u07sbK');"> <div class="textWrapper"><h2>Grey crowned crane</h2> <div class="content">Balearica regulorum</div> </div> </div><!--
--><div class="tile" style="background-image: url('http://bit.ly/1AXC169');"> <div class="textWrapper"><h2>Saxony, Germany</h2> <div class="content">Bastei bridge in the Elbe Sandstone Mountains.</div> </div> </div><!--
--><div class="tile" style="background-image: url('http://bit.ly/1vqesCL');"> <div class="textWrapper"><h2>Streetseller, India</h2> <div class="content">Indian streetseller hands selling green chickpeas.</div> </div> </div><!--
--><div class="tile" style="background-image: url('http://bit.ly/1zL4kCl');"> <div class="textWrapper"><h2>Shirakawa-go, Japan</h2> <div class="content">Traditional Japanese village showcasing a building style known as gasshō-zukuri.</div> </div> </div><!--
--><div class="tile" style="background-image: url('http://bit.ly/1q8nfWt');"> <div class="textWrapper"><h2>Ferronor GR12U 412, Chile</h2> <div class="content">Ferronor GR12U 412 on the gradient between Montadon and Codelcos Potrerillos plant.</div> </div> </div>
</div>
</body>
</html>
Responsive Image Grid with set Height - Script Codes CSS Codes
.imageGridPercentage { line-height: 0; height: 40em;
}
.imageGridPercentage .tile { width:33.33%; height:50%; line-height: 1.2; display:inline-block; background-size: cover; background-position: center center; background-repeat: no-repeat; overflow: hidden; position: relative; color:#fff; font-family:"Verdana",sans-serif; text-shadow: 2px 2px 2px #000; cursor: pointer; cursor: hand;
}
.imageGridPercentage .tile:before { content: ''; background-color: rgba(15,15,15,0.5); display: block; width: 100%; height: 100%; z-index: 0; position: absolute;
}
.imageGridPercentage .tile:hover:before { display: none;
}
.imageGridPercentage .tile .textWrapper { text-align: center; vertical-align: middle; width: 80%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: .75em;
}
.imageGridPercentage .tile .textWrapper .content { display: none;
}
.imageGridPercentage .tile:hover .textWrapper .content { display: block;
}
.imageGridPercentage .tile:hover .textWrapper .content h2 { margin: 0;
}
@media (max-width: 800px) { .imageGridPercentage .tile { width: 100%; height: 16.7%; } .imageGridPercentage .tile .content{ display: none!important; }
}
Developer | Richard |
Username | Ketziel |
Uploaded | August 02, 2022 |
Rating | 3 |
Size | 2,343 Kb |
Views | 40,480 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Simple Responsive Image Grid | 2,397 Kb |
Flex Box Tiles | 3,468 Kb |
A Pen by Richard | 2,414 Kb |
CSS Icon Collection | 2,538 Kb |
CSSman | 1,821 Kb |
Colour Schemes | 2,557 Kb |
Animated Book | 2,629 Kb |
CSS Plus Sign | 1,891 Kb |
Atomic | 2,098 Kb |
CSS Styled Select Box | 2,048 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Degree Picker | Idered | 4,307 Kb |
Eunice A | Ejbronze | 2,203 Kb |
Fixed Scrolling Nav Bar | Philsinatra | 0 Kb |
Spinners using Font Icons | Keyamoon | 3,007 Kb |
Personal Logo Animation | Lloydwheeler | 3,795 Kb |
Tile Animation Thing | Frxnz | 4,332 Kb |
Twitch.tv API | Ryzokuken | 2,618 Kb |
Drag in vanilla js using dotval math instead of translate | Paulq | 2,662 Kb |
Sony Xperia Z3 Flat MockUp | Dapinitial | 4,379 Kb |
Weather App 2 | MightyJoeW | 2,877 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!