css-grid Questions

7

I'm working with some css-grid formatted content. I have a rule like the one below, applied to an element within the grid: <some selector here> { grid-column-end: span 4; } When I do this, ...
Roam asked 28/12, 2022 at 1:41

2

Solved

Is there an analog to flex-grow for the grid property ? I'd like my grid areas to accomodate the content they receive but have some areas take more place than others like flex-grow for flex. Pra...
Mcdaniels asked 24/8, 2017 at 20:25

2

Solved

When grid-template-areas: "....... header header" "sidebar content content"; is changed to: grid-template-areas: "....... header header" "sidebar header cont...
Templar asked 2/8, 2017 at 11:32

5

I have a list of items that I'm trying to arrange into a scrollable horizontal layout with flexbox. Each item in the container has a margin left and right, but the right margin of the last item is...
Donoghue asked 17/8, 2016 at 9:45

6

Solved

Is it possible to make a CSS grid wrap without using media queries? In my case, I have a non-deterministic number of items that I want placed in a grid and I want that grid to wrap. Using Flexbox,...
Chest asked 30/3, 2017 at 22:21

6

I am using VS code for a project using CSS Grid and CSS Modules. However when I try something like this .loginRegisterDiv { composes: loginDiv; margin: 0px; width: 100%; } I get an error sayi...
Machutte asked 28/2, 2017 at 22:51

1

Solved

https://play.tailwindcss.com/gUoOBmaNxj was my attempt: <div class="w-96 border-2 border-red-500"> <div class="grid auto-cols-max grid-flow-col gap-2 border-2 border-black&...
Strow asked 26/9, 2023 at 16:18

3

I'm creating a layout using CSS Grids, and I want to have different space between each row. I can create the layout fine by just using margin on each element, but this kind of obscures the simpli...
Severe asked 23/11, 2017 at 18:15

3

Solved

I am trying to create an overlay in CSS3 grid but I can't seem to figure out how I can go about achieving it. I have searched online but haven't found anything of help. I want to achieve something ...
Infante asked 27/3, 2018 at 14:39

11

I'd like to have the html below showing in n equal columns whether there are two, or three, or more child elements to the row element using css grid - Flexbox makes this easy but I cannot get it do...
Spread asked 1/12, 2017 at 21:12

2

Solved

I have three columns and one row and I want to place each grid-element into one of the three resulting cells. This is what I want, using three container-elements: main { display: grid; gri...
Wahhabi asked 23/7, 2017 at 11:3

6

Solved

.grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 100px; grid-auto-rows: 60px; grid-gap: 15px; } .col { background-color: tomato; } <div cla...
Summon asked 3/12, 2017 at 0:23

8

Solved

I have a CSS grid that represents the tic-tac-toe game. I wanted to put an border only inside the grid. Today, I proceed in this way: :root { --border: 2px dashed #393939; --symbol-color: ...
Automata asked 29/3, 2018 at 11:18

8

I have a grid in which I position images but they doen't fill the entire space they are given. I hope the image below illustrates the problem good enough. As we can see the top image as well as th...
Shastashastra asked 26/5, 2018 at 12:12

10

Solved

Given the current CSS grid example, how can I collapse the borders in order to avoid the double borders ? This is such a simple thing to achieve using an Html table. How do I do it using display: ...
Vilipend asked 19/12, 2017 at 8:38

5

I have a list of 3 buttons I'm trying to display in a grid. The text of the buttons is dynamic, it could be one word or a full sentence. I'd like each button's width to be determined thru its conte...
Boisleduc asked 26/6, 2020 at 4:36

4

I want to show only the first row of the Grid and hide other rows. I know we can do this by using max-height and the @media queries, but in this case, the height of each item in the grid should be ...
Mcmillen asked 31/7, 2020 at 1:45

3

Solved

I've read a lot of tutorials about CSS flex boxes and CSS grids, but frankly I just can't figure out how to do this simple(?) thing. All I want is for the elements in a container to all be as wide...
Lacerta asked 28/12, 2017 at 7:21

3

What are the differences between the flexbox and grid systems? Under which circumstances should I use each system?
Advocation asked 30/4, 2018 at 5:41

2

I have a neat responsive grid like this: grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); This makes each grid item at least 200px wide. One of the items (the red one) is twice as w...
Gus asked 30/10, 2018 at 15:27

4

Solved

I have a component embedded in a css-grid. In stack blitz I have an external grid of 3 rows. The one of the rows has a min-width. How do I get it to scroll horizontally if the viewport is smaller t...
Eightfold asked 22/5, 2020 at 16:12

1

I have an unknown number of items that will display in a grid. When a row is incomplete, like the second row shown in the screenshots, I need the items to align to the right. I can achieve the eff...
Eoin asked 1/6, 2022 at 11:57

5

Solved

I'm really confused. When looking for online resources and documentation, most of the documentation of these properties seem to reference Flex-box, not grid. And I don't know how applicable the doc...
Arredondo asked 31/1, 2018 at 6:11

3

Solved

Let's say I have a 3-column CSS-Grid. Is there a way, using JavaScript, to get the grid-row and grid-column of an auto-placed element? Example: console.log($('#test').css('grid-row'), $('#test')....
Althorn asked 13/7, 2018 at 14:49

6

Solved

Why do I have an overflow on the X axis in the following snippet? The overflow is generated once I apply grid-gap: 10px on my .body grid container. div:not(.header):not(.body):not(.row) { b...
Mowery asked 11/1, 2018 at 19:12

© 2022 - 2024 — McMap. All rights reserved.