CSS Grid Course
Why Stack Overflow recommends it
Stack Overflow users link it as a practical CSS Grid tutorial, especially for responsive auto-fit columns, image galleries and alignment properties.
Recommended by 5 people across 5 different months, 2018 to 2024.
What it is
A one-hour freeCodeCamp course by Per Harald Borgen (Scrimba) that teaches CSS Grid from scratch. It builds a website layout and an image grid, then covers named lines, alignment, auto-fit vs auto-fill, article layouts and Grid vs Flexbox.
What people said
Recommends Freestyle09 · 2018-06 · Stack Overflow · on “Css - auto grid list of photos(angular 6)”
I found solution on youtube course of grid css. [this video] css: .row { display: grid; grid-gap: 5px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); grid-template-rows: auto; grid-auto-flow: dense; } .imageGallery1 { text-align: center; position: relative; & img { width: 100%; max-height: 510px; height: 251px; } } .vertical { grid-row: span 2; & img { height: 510px; } } and now each vertical photo has its own class with grid-row: span 2; Maybe i could help someone
Recommends user10322993 · 2018-12 · Stack Overflow · on “trying to replicte css grid image gallery from youtube but got stuck”
![desired result ]1 [LINK] [![current result(note: image was too big to post here but just imagine all of the columned images running to the bottom of the window .wrapper { display: grid; grid-gap: 5px; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); grid-auto-rows: 75px; } <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>CSS Grid</title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="wrapper"> <div class="vertical"><img src="img/p1.jpeg" alt=""></div> <div class="horizontal"><img src="img/p15.jpeg" alt=""></div> <div><img src="" alt=""><img src="p2.jpeg" alt=""></div> <div class="vertical"><img src="img/p14.jpeg" alt=""></div> <div><im
Recommends halilibrahimtosun · 2020-05 · Stack Overflow · on “align-content doesn't work with chrome grid”
no i am not using bootstrap, this div.container has got 6 divs with different colors. i just want to this div to change its position vertically by using align-content. but it doesnt work so strange. i am watching in this video 41:25 [this video] ... but i couldnt..
Recommends Mehul · 2020-07 · Stack Overflow · on “Is there a value of TOP in CSS that can dynamically position an element based on the length of the previous element?”
As of now, there is no way that you can style a div (or any other element for that matter) dynamically on the basis of a previous element. But you have some options here - either you can use Javascript to manage the styles of elements dynamically, or, you can use CSS FlexBox Model or CSS Grid to position and change height/width of elements, which is highly recommended and super powerful for making any layout of your choice. Here are some places which I used to learn flexbox - freeCodeCamp flexbox tut [LINK] Brad Traversy flexbox crash course [LINK] Now for CSS grid- Brad Traversy CSS Grid [LINK] freeCodeCamp CSS Grid [this video]
Recommends Birol Yılmaz · 2020-08 · Stack Overflow · on “Body of html document is not extending past a div unless i remove floating property of the div(s)”
Instead of media query you can use grid property in css. <div class="main"> <div> <h2 ></h2> </div> <div> <h2 > Chicken</h2> </div> <div> <p> my contents </p> </div> </div> css: .main{ display:grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); } That should solve your problem. If you dont understand what grid is, I recommend you to watch these : [this video] It is more powerful and useful.
Cites Ramiz Afzal · 2024-05 · Stack Overflow · on “CSS Grid BentoBox UI Column width issue on specific break-point”
I have created a BentoBox UI using CSS grid, and it is working fine for the most part the only issue I'm facing is in between the break-point from 768px to 926px. I'm using grid-template-columns to dynamically add in columns when enough space is available but between the above mentioned break-points I get a weird 2 columns layout where the first column is bigger than the minimum size I have defined in my CSS (400px) and the second column is really small. Is there a proper way of fixing this or should I just increase the mobile media query range to also include this break-point The tutorial I followed to implement this layout: [this video] My current code: CodePen [LINK] * { box-sizing: border-box