Skip to main content

All Questions

1 vote
2 answers
87 views

How can I split members of a subgrid when reordering (due to screen size)

I'm creating a web UI where I have one large area of main information, and three sidebar areas. Two of the sidebars are narrow, and one is wider. On a wide enough display, I want to show them like ...
Chowlett's user avatar
  • 46.8k
0 votes
0 answers
94 views

How to create responsive and perfectly rectangular grids?

Working Demo Here is a demo of responsive, perfectly rectangular grids in CSS. No matter the width of the screen, the grid will always form a perfect rectangle. body { max-width: 900px; } ....
thenickman100's user avatar
0 votes
1 answer
70 views

How can I minimize CSS code for responsive calculator buttons using order? [closed]

I am designing a responsive calculator, and I want to simplify the CSS code used for arranging the buttons. Currently, I am using CSS Grid to handle the layout, but the code is getting lengthy because ...
mohaddese's user avatar
0 votes
0 answers
52 views

css grid transition while having auto-fit and minmax on

example 1 example 2 #grid { height: 50vh; transition: 500ms; display: grid; justify-content: center; // grid-template-columns: 1fr 1fr 1fr 1fr; grid-template-columns: repeat(auto-fit, ...
Dunston Darius's user avatar
0 votes
1 answer
142 views

Responsive css grid with fixed rows and maximum columns but can show more items

I'm trying to create a grid component where the layout is 2 rows and x columns. Columns can be max 6 and the grid items are react children of unknown amount, hence the x columns. I got a grid down but ...
ida's user avatar
  • 1
0 votes
1 answer
46 views

Select all the elements of the last row of a grid with a responsive design [duplicate]

I've created a grid of elements using grid, and every elements from a row is separated with a bottom border. I would like to remove this border bottom line for all the elements from the last row. This ...
itab ghazouani's user avatar
0 votes
2 answers
313 views

Text causing CSS grid column to extend beyond the websites dimensions?

So the text in this content column for CSS Grid is causing it too expand beyond the websites dimensions, i've tried using text overflow, text-wrap etc... to fix it but nothing seems to be working, ...
Emerald Wolf's user avatar
1 vote
0 answers
927 views

Why does container-type: inline-size (for container queries) seem to break CSS grid's minmax(min-content, max-content)?

I've got a CSS layout that relies upon CSS grid's minmax(min-content, max-content) for responsively laying out many of its elements. Here's a reduced example: html, body { margin: 0; padding: 0; } ...
Kerrick's user avatar
  • 7,478
0 votes
1 answer
120 views

How to get nested grid to span entire page when the parent grid has an aside

I made a parent grid consisting of 2 columns, the one on the right is an aside. I made a nested grid of 3 columns in the parent grid's first column. I changed the order of the columns on smaller ...
Brudderway's user avatar
0 votes
1 answer
89 views

How to make a grid item not stretch the whole row if there is only 1 item in it with auto-fit

I made a responsive grid layout with repeat(auto-fit, minmax(300px, 1fr) HTML: <body> <div class="container"> <div class="card">Card</div> ...
Kaasjongetje's user avatar
1 vote
0 answers
75 views

Serving responsive images: how to use `grid` + `minmax` + `sizes` attribute?

Goal optimize performance of a static site by serving the user the smallest image for their viewport. not doing any art direction right now, but considering it for the future. Situation a bunch of ...
Tom_Szwa's user avatar
-2 votes
2 answers
64 views

Layout some grid columns vertically on small screens

I have a form that looks like this: I have laid it out using CSS grid: <div style="display: inline-grid; grid-template-columns: auto auto auto auto"> <div><input></div> ...
AndreKR's user avatar
  • 33.8k
0 votes
2 answers
120 views

Responsive grid within multiple divs with no stylesheet

I am trying to make a layout that looks roughly like this on a computer: wide layout and this on mobile: tall layout I CANNOT use a separate stylesheet or the < style > tag, only the style ...
skitty's user avatar
  • 3
4 votes
1 answer
231 views

Space between when 1 row, and center elements when they are 2 rows?

I'm developing a nav bar and there are 2 elements. The logo on the left, and the list of actions on the right (this element has a dynamic number of elements). When they can fit on one row, I want them ...
Ryan Peschel's user avatar
  • 11.9k
0 votes
2 answers
910 views

Auto Fit inner div grid to outer column and row height with CSS

I have an image gallery that is overflowing its containing div. I have tried various solutions to no avail. What CSS code approach will fit the grid to the fixed-height outer div, including making ...
Eric Hepperle - CodeSlayer2010's user avatar

15 30 50 per page
1
2 3 4 5
8