Skip to main content

Questions tagged [css-grid]

CSS grid layout is a W3C technology that allows for the creation of grids. It eliminates the need to use floats, tables, absolute positioning and even flexbox for building all sorts of grids, from simple to complex. Do not use this tag for CSS grid systems in general.

1 vote
0 answers
14 views

How to overlap flex items in a fix width?

The final result I want is this and the result I am able to obtained is this. Basically I want the cards to overlap in a fixed width, when it is overflowing its parent. And when it is not overflowing, ...
lorem1213's user avatar
  • 452
0 votes
0 answers
15 views

Grid layout where one element can expand without affecting its row

I have grid layout like this: Here is the reproduction link: https://stackblitz.com/edit/stackblitz-starters-4y8ked?file=index.html And here is the code snippet with the grid styles: display: grid; ...
AnJ's user avatar
  • 614
0 votes
1 answer
24 views

one grid item is affecting grid items of another (parent) grid

I have the following code which works fine. *, *::before, *::after { box-sizing: border-box; } img { width: 100%; } body { font-family: monospace; background-color: aliceblue; } ....
Pexicade's user avatar
1 vote
1 answer
39 views

CSS Grid - make next row take 100% width and space items evenly

I have a list of items in a row. I want each item to take up a minimum width. When the user resizes the screen I want the items to overflow to the next line. .container { display: grid; grid-...
SoluableNonagon's user avatar
-4 votes
0 answers
28 views

What is the cleanest way to dynamically build a grid layout on a web page? [closed]

Say i'm building a page to compare mobile phones according to various aspects (somewhat like this, but with some differences). I want a tabular layout, with a column for each phone, and a row for each ...
Tom Anderson's user avatar
  • 46.8k
0 votes
0 answers
24 views

Does changing the grid-row will changes the grid-column value to 1/2? (CSS) [duplicate]

My main question there is in the title, here I will ask my question in the following example: CSS and HTML codes: *{ margin: 0; padding: 0; } .panel{ display: grid; grid-template-...
Mohammad's user avatar
-1 votes
0 answers
17 views

How to create a specific row spanning flex grid [duplicate]

I am trying to create the flex grid in the attached image. the last column row spans, the second row col spans. I cannot seem to quite get there, can any flex grid experts help? flex grid example Been ...
Shaun's user avatar
  • 1
0 votes
2 answers
59 views

I am having trouble getting rid of the whitespace i have inbetween some of my div columns

this is a picture of the issue I am currently coding a website for a client. This is a portfolio website to showcase their photography and im running into an issue with my layout. I have one div as my ...
WaveyDude's user avatar
0 votes
1 answer
31 views

Tailwind: dynamic grid columns with no gaps

The documentation is not very clear about all the grid options there. I have this grid template in alpinejs styling it with tailwind: <div x-show="multiple" class="w-auto grid mt-3&...
domjanzsoo's user avatar
1 vote
4 answers
60 views

How to float elements from bottom left corner to top right corner

Is there a smart and simple way to float elements from bottom left corner to top right corner? My solution with display:grid is too static and has fix cols and not more than 10 items. I`m searching ...
Michael Koch's user avatar
1 vote
0 answers
19 views

CSS Resize grid cell based on image content

I have the following basic HTML + CSS of a grid with 2 columns and 3 rows: <div class="container"> <div class="inner-container"></div> <div class="...
Texfy's user avatar
  • 47
-1 votes
1 answer
34 views

Data table using CSS Grid and Div elements [closed]

I created a data table using CSS Grid and Div elements. Previously, I used Display Flex, but I had trouble implementing rowspan and colspan with Div elements. .grid-responsive { overflow-x: auto;...
Sandip Developer's user avatar
0 votes
2 answers
46 views

Grid Template Layout - aligning multiple items in same column (self align start)

I'm trying to use grid template to build a layout for different views (mobile / desktop etc). I'm using grid-template-area. For mobile it is easy since I'm using just 1 column but when I go to desktop ...
Mike Trinh's user avatar
  • 1,303
1 vote
3 answers
54 views

Reordering columns in CSS grid

I have the following HTML: <ul> <li> <p>A</p> <p>B</p> <p>C</p <p>D</p> </li> <li> <p>AAA</p> ...
ICR's user avatar
  • 14.1k
1 vote
1 answer
52 views

Vertical alignment by baseline in css grid doesn't work in Firefox and Safari when height is not defined

I need to arrange multiple items with pictures and titles in a row of a grid like this: The aspect ratio of the pictures is known. The amount of columns is known. The grid's width is inherited from ...
dumistoklus's user avatar

15 30 50 per page
1
2 3 4 5
420