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...
2
Solved
When
grid-template-areas:
"....... header header"
"sidebar content content";
is changed to:
grid-template-areas:
"....... header header"
"sidebar header cont...
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...
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,...
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...
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 ...
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...
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...
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: ...
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...
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: ...
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...
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 ...
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...
3
What are the differences between the flexbox and grid systems? Under which circumstances should I use each system?
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...
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...
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...
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...
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...
© 2022 - 2024 — McMap. All rights reserved.