Skip to content

Instantly share code, notes, and snippets.

View HarishBoke's full-sized avatar
🎯
Focusing

Harish Boke HarishBoke

🎯
Focusing
View GitHub Profile
@HarishBoke
HarishBoke / verticalGrid.html
Last active August 14, 2019 14:16
Vanila JS - Vertical Grid, Add columns on event
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Style CSS -->
<link rel="stylesheet" href="./../assets/bootstrap.min.css">
<title>Vertical Grid Component</title>
<style>
/**
* CSS image crop. Forces image to 4:3 aspect ratio cropping at the middle.
* http://dabblet.com/gist/4711695
*/
.img-crop,
.img-crop img{
width: 100%; /* gotta be responsive these days */
}
.img-crop{
background-color: #ededed; /* some background color for short images */