Responsive Boxes with CSS3 Columns
How do I make an responsive boxes with css3 columns?
OK, so here's the correct answer to this problem: CSS3 Columnns with a .no-csscolumns Modernizr fallback to floats and media-queries. Seriously, this makes this problem so much easier. to deal with. Just set your column-width and column-gap and boom: responsive gallery layout. Thanks to @chriscoyier for pointing this idea out to me! . What is a responsive boxes with css3 columns? How do you make a responsive boxes with css3 columns? This script and codes were developed by Andy McFee on 09 August 2022, Tuesday.
Responsive Boxes with CSS3 Columns - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Responsive Boxes with CSS3 Columns</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script>
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Responsive Boxes with CSS3 Columns</h1>
<h2>resize your window & more info at the bottom</h2>
<div class="box-container"> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div> <div class="box"><img src="http://placekitten.com/g/400/400" alt=""></div>
</div>
<p>OK, so here's the correct answer to this problem: CSS3 Columnns with a <code>.no-csscolumns</code> Modernizr fallback to floats and media-queries. Seriously, this makes this problem so much easier. to deal with. Just set your <code>column-width</code> and <code>column-gap</code> and boom: responsive gallery layout. Thanks to @chriscoyier for pointing this idea out to me! </p> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Responsive Boxes with CSS3 Columns - Script Codes CSS Codes
body { text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.85); background: #333; color: #eee; font-family: "HelveticaNeue-CondensedBold", "Open Sans Condensed", "Helvetica Neue", Helvetica, Arial, sans-serif; margin: 0; padding: 0; text-align: center;
}
.box-container { position: absolute; top: 0; left: 0; right: 0; z-index: -1; overflow: hidden; *zoom: 1; -moz-column-width: 200px; -webkit-column-width: 200px; column-width: 200px; -moz-column-gap: 0; -webkit-column-gap: 0; column-gap: 0; margin: 0; padding: 0;
}
.box { display: inline-block; margin: 0; padding: 0; width: 100%; background: red;
}
.box:nth-child(1) { background: #ff006f;
}
.box:nth-child(2) { background: #ff0037;
}
.box:nth-child(3) { background: red;
}
.box:nth-child(4) { background: #ff3700;
}
.box:nth-child(5) { background: #ff6f00;
}
.box:nth-child(6) { background: #ffa600;
}
.box:nth-child(7) { background: #ffdd00;
}
.box:nth-child(8) { background: #eaff00;
}
.box:nth-child(9) { background: #b3ff00;
}
.box:nth-child(10) { background: #7bff00;
}
.box:nth-child(11) { background: #44ff00;
}
.box:nth-child(12) { background: #0dff00;
}
.box:nth-child(13) { background: #00ff2b;
}
.box:nth-child(14) { background: #00ff62;
}
.box:nth-child(15) { background: #00ff99;
}
.box:nth-child(16) { background: #00ffd0;
}
.box:nth-child(17) { background: #00f7ff;
}
.box:nth-child(18) { background: deepskyblue;
}
.box:nth-child(19) { background: #0088ff;
}
.box:nth-child(20) { background: #0051ff;
}
.box:nth-child(21) { background: #001aff;
}
.box:nth-child(22) { background: #1e00ff;
}
.box:nth-child(23) { background: #5500ff;
}
.box:nth-child(24) { background: #8c00ff;
}
.box:nth-child(25) { background: #c400ff;
}
.box:nth-child(26) { background: #fb00ff;
}
.box:nth-child(27) { background: #ff00cc;
}
.box:nth-child(28) { background: #ff0095;
}
.box:nth-child(29) { background: #ff005e;
}
.box:nth-child(30) { background: #ff0026;
}
.box:nth-child(31) { background: #ff1100;
}
.box:nth-child(32) { background: #ff4800;
}
.box:nth-child(33) { background: #ff8000;
}
.box:nth-child(34) { background: #ffb700;
}
.box:nth-child(35) { background: #ffee00;
}
.box:nth-child(36) { background: #d9ff00;
}
.box:nth-child(37) { background: #a2ff00;
}
.box:nth-child(38) { background: #6aff00;
}
.box:nth-child(39) { background: #33ff00;
}
.box:nth-child(40) { background: #00ff04;
}
.box:nth-child(41) { background: #00ff3c;
}
.box:nth-child(42) { background: #00ff73;
}
.box:nth-child(43) { background: #00ffaa;
}
.box:nth-child(44) { background: #00ffe1;
}
.box:nth-child(45) { background: #00e6ff;
}
.box:nth-child(46) { background: #00aeff;
}
.box:nth-child(47) { background: #0077ff;
}
.box:nth-child(48) { background: #0040ff;
}
.box:nth-child(49) { background: #0009ff;
}
.box:nth-child(50) { background: #2f00ff;
}
.box:nth-child(51) { background: #6600ff;
}
.box:nth-child(52) { background: #9d00ff;
}
.box:nth-child(53) { background: #d500ff;
}
.box:nth-child(54) { background: #ff00f2;
}
.box:nth-child(55) { background: #ff00bb;
}
.box:nth-child(56) { background: #ff0084;
}
.box:nth-child(57) { background: #ff004d;
}
.box:nth-child(58) { background: #ff0015;
}
.box:nth-child(59) { background: #ff2200;
}
.box:nth-child(60) { background: #ff5900;
}
.no-csscolumns .box { display: block; float: left;
}
@media (min-width: 200px) { .no-csscolumns { width: 50%; }
}
@media (min-width: 400px) { .no-csscolumns { width: 33.33333%; }
}
@media (min-width: 600px) { .no-csscolumns { width: 25%; }
}
@media (min-width: 800px) { .no-csscolumns { width: 20%; }
}
@media (min-width: 1000px) { .no-csscolumns { width: 16.66667%; }
}
@media (min-width: 1200px) { .no-csscolumns { width: 14.28571%; }
}
@media (min-width: 1400px) { .no-csscolumns { width: 12.5%; }
}
@media (min-width: 1600px) { .no-csscolumns { width: 11.11111%; }
}
@media (min-width: 1800px) { .no-csscolumns { width: 10%; }
}
@media (min-width: 2000px) { .no-csscolumns { width: 9.09091%; }
}
@media (min-width: 2200px) { .no-csscolumns { width: 8.33333%; }
}
@media (min-width: 2400px) { .no-csscolumns { width: 7.69231%; }
}
@media (min-width: 2600px) { .no-csscolumns { width: 7.14286%; }
}
@media (min-width: 2800px) { .no-csscolumns { width: 6.66667%; }
}
@media (min-width: 3000px) { .no-csscolumns { width: 6.25%; }
}
@media (min-width: 3200px) { .no-csscolumns { width: 5.88235%; }
}
@media (min-width: 3400px) { .no-csscolumns { width: 5.55556%; }
}
@media (min-width: 3600px) { .no-csscolumns { width: 5.26316%; }
}
@media (min-width: 3800px) { .no-csscolumns { width: 5%; }
}
@media (min-width: 4000px) { .no-csscolumns { width: 4.7619%; }
}
img { margin: 0 0 -5px; max-width: 100%; opacity: 0.5; padding: 0;
}
h1, h2 { display: block; margin: 20px auto 0; padding: 0; text-align: center; text-transform: uppercase;
}
h2 { font-size: 11px; margin: 0 auto 20px;
}
a { color: #FFF; text-decoration: underline;
}
p { -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; -moz-box-shadow: 0 0 10px rgba(0, 0, 0, 0.65) inset; -webkit-box-shadow: 0 0 10px rgba(0, 0, 0, 0.65) inset; box-shadow: 0 0 10px rgba(0, 0, 0, 0.65) inset; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; background: rgba(0, 0, 0, 0.55); display: block; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 18px; font-weight: normal; line-height: 1.5em; margin: 20px auto; max-width: 500px; padding: 20px; text-align: left;
}
@media (max-width: 540px) { p { margin: 20px; }
}
Developer | Andy McFee |
Username | andymcfee |
Uploaded | August 09, 2022 |
Rating | 3 |
Size | 4,168 Kb |
Views | 34,408 |
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 |
BEM Flexbox Nav build for a workshop | 3,126 Kb |
A Pen by Andy McFee | 2,034 Kb |
Flexbox Header Demo | 2,618 Kb |
Responsive Web App Panel Layout | 5,055 Kb |
Responsive Boxes with Images | 3,915 Kb |
CSS3 Border Image | 2,853 Kb |
Round Music Player with Official.fm API | 6,473 Kb |
Flexbox vertcially centered nav text | 4,011 Kb |
Responsive Boxes without Images | 4,120 Kb |
Calculator | 7,374 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 |
Basecamp 3 Document | Lachlanjc | 3,811 Kb |
RRC wrapSwitch | Pshrmn | 2,922 Kb |
Random Gradients - JS | Aldlevine | 2,026 Kb |
Drifting Clouds | Benedikte | 2,247 Kb |
Custom Checkbox and radio inputs SCSS | Rgfx | 3,367 Kb |
Fun form with currentColor | Bnthor | 2,713 Kb |
Drill-down Map | Good886 | 8,484 Kb |
Custom checkbox example | Capelo | 3,495 Kb |
Resize image | Happyhj | 1,892 Kb |
Javascript Welcome | Peterlewicki | 1,573 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!