6,434 questions
-3
votes
0
answers
87
views
CSS Grid: why 1fr auto 1fr does not keep the middle column truly centered? [closed]
I’m trying to build a simple 3-column layout using CSS Grid:
left content aligned to the left
right content aligned to the right
middle element must be geometrically centered relative to the whole ...
0
votes
2
answers
97
views
How to set grid-row on grids that are subgrids?
In this youtube tutorial the author sets grid-template-rows to auto auto auto such that the subgrid items get 3 rows each.
Then later he replaces the grid-template-rows:auto auto auto setting with ...
1
vote
2
answers
133
views
CSS Grid Layout- How to keep menu elements inside the navbar when being resized?
I'm practicing to build a website layout that's primarily structured with using CSS grids - a single-column, multi-row grid - with the following ideas:
1. The Navbar has a determined height
2. There ...
-1
votes
0
answers
59
views
Dynamic columns, with 1 column span to the row end of grid layout [duplicate]
I was trying to create a somewhat responsive css grid layout with this kind of setup in mind:
variable number of col
through repeat minmax
------+----------------
aside | item | item | ...
0
votes
1
answer
91
views
CSS grid adaptive cells [closed]
I'm trying to make sure the columns are the same width and can expand/contract freely as numbers are entered or deleted. I was able to achieve the desired behavior, but how can I prevent the right ...
Best practices
0
votes
3
replies
101
views
How to respect other elements when breaking out of container?
I got a layout that is two columns where the right column will contain some text and a header. The header should also have the possibility to either remain in its column or span across both columns ...
5
votes
3
answers
142
views
Why does a different row height in the 4th row change the row height distribution among the first three rows?
I have a Grid with two columns and 4 rows. The grid-areas are as follows
grid-template-areas:
"v p"
"v o"
"v t"
"m t";
I have one Item per area. So my item v (...
1
vote
1
answer
85
views
How to make position: sticky work inside a CSS Grid child with overflow?
I am trying to create a layout where the page height is fixed to the viewport (100vh), the .sidebar and .content areas scroll independently, and a .content-header inside .content should stay sticky ...
0
votes
1
answer
60
views
repeat(auto-fit, minmax(auto, 1fr) is not valid syntax
I want to create a grid with repeated columns. The columns should be as large as the children's content and then the remaining space in a track should be distributed.
I thought I could achieve this ...
1
vote
1
answer
66
views
Why does `line-height:1` cause overflow in this CSS grid?
I'm a little new to CSS grid stuff, so forgive me if this is obvious, but I haven't found a good explanation for this so far.
In my mind, line-height:1 basically means "use the normal value."...
0
votes
1
answer
88
views
I'm getting extra space following the content in a one column / two row cell [closed]
I have a 3 column by 4 row CSS grid. The cell in the first column spans two rows and I want the next row to be directly after the content in that first cell, but there's a space between the content ...
4
votes
2
answers
147
views
Right-align grid items
I've got this snippet:
.grid {
border: 1px solid #c5c5c5;
width: 220px;
display: grid;
grid-template-columns: 60px 60px;
grid-auto-rows: 40px;
row-gap: 10px;
column-gap: 10px;
...
1
vote
1
answer
138
views
How can I extend a CSS grid to create overhangs?
Semantically I have a table so I would use the HTML <table> element. For grouping rows I can use <tbody>:
<table>
<tbody>
<tr><td>A</td><td>...
0
votes
1
answer
103
views
HTML scrollable list with variable
I am building a UX where the page needs to have header and footer glued to the top and bottom of the screen, and the main section in the middle must take up all the space.
One of the views that goes ...
2
votes
0
answers
124
views
Is it possible to do this in CSS Grid / Flexbox? [closed]
So I have a parent with divs inside.
I want each div to be a column (amount of columns can be changed by the user).
I want each div to take as much space as possible until it hits a width of 15rem for ...