grid with 2 columns
-
it is possible GRID with two columns, where first image are bigger, and second image are 50% smaller, both in the same row, but smaller image must be align to the center of the bigger in Modula gallery? (client’s fantasy).
I got this code from AI:
but of course .classes{} in Modula are quite different:[css:]
.gallery {
display: grid;
grid-template-columns: 2fr 1fr; /* First column is twice as wide as the second column / gap: 10px; / Gap between grid items */
}.gallery img { width: 100%; height: auto; display: block; } .smaller { align-self: center; /* Align the smaller image to the center vertically within its grid cell */ }
[html:]
Gallery
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘grid with 2 columns’ is closed to new replies.