Skip to main content
Filter by
Sorted by
Tagged with
5 votes
3 answers
114 views

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 (...
Sebastian's user avatar
  • 569
1 vote
0 answers
41 views

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 ...
Tiya varshney's user avatar
-1 votes
0 answers
36 views

I'm building an analytics dashboard with variable-height cards (e.g., text metrics vs. embedded charts). Using CSS Grid's auto-fit for responsiveness works on desktop, but resizing causes uneven gaps ...
Arshdeep Kaur's user avatar
0 votes
1 answer
50 views

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 ...
Clockworks's user avatar
1 vote
1 answer
63 views

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."...
jwd's user avatar
  • 11.4k
0 votes
1 answer
86 views

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 ...
Rich DeBourke's user avatar
4 votes
2 answers
145 views

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; ...
Linden Wells's user avatar
1 vote
1 answer
134 views

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>...
Ambiguous Illumination's user avatar
0 votes
1 answer
102 views

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 ...
Sten Petrov's user avatar
  • 11.1k
2 votes
0 answers
122 views

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 ...
lm16's user avatar
  • 89
1 vote
1 answer
60 views

I'm trying to set up a table via css grid where the first row is a header and remaining rows are just table data. <div class="grid"> <div class="header">header</...
cat-t's user avatar
  • 1,430
3 votes
1 answer
147 views

I'm working with CSS Grid and I noticed a behavior I don't fully understand. body { background: rgb(58, 58, 59); } .grid-parent { height: 90vh; display: grid; gap: 5px; grid-template-...
Felix's user avatar
  • 23
-1 votes
1 answer
84 views

I have 1500 divs (nothing should be displayed into them) and I would like based on the size of the viewport size to build a grid that best fill in the viewport. Divs should fill the rows up to the end ...
Vlad's user avatar
  • 225
2 votes
3 answers
299 views

I want to create a masonry style layout Here is how i did it but it didn't work as expected: .grid-container { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 10px; background-...
Lại Quyết Thắng's user avatar
2 votes
1 answer
58 views

Using the following HTML why adding border mis-aligns the children: https://jsfiddle.net/7dp2uqe8/ <style type="text/css"> .flex { display: flex; } .flex-item { flex:...
user13844939's user avatar
1 vote
4 answers
118 views

I am using CSS-grid responsible layout for web. The layout have three sections leftmenu, content and right. For those sections I have to use spinners. The spinners width and height need to increased ...
Reegan's user avatar
  • 349
1 vote
0 answers
69 views

I want to define a set of css rules to accomplish the following effect: I have a variable amount of child items of fixed size that need to be arrange in columns. If the items reach a certain height, ...
Ecanyte's user avatar
  • 91
0 votes
1 answer
125 views

I'm having a problem with a grid component I've built, as described in the title. The elements are relative to a parent higher in the dom, but when their direct parent's scroll width is scrolled, they ...
Lee Skies's user avatar
1 vote
2 answers
96 views

I’m trying to understand what’s happening with the grid-column property in what’s supposed to be a single row. I have a simple grid of four items with grid-template-columns, where I want to reverse ...
Manngo's user avatar
  • 17k
6 votes
2 answers
191 views

I have a CSS grid of "cards" that can have some optional content in the middle. Within the cards I'm using grid-template-rows: subgrid so that the rows of content in each card can align with ...
Paul's user avatar
  • 2,009
0 votes
1 answer
102 views

If I'm making a grid with a fixed size, with some cells/areas populated, is there a way to format the implicit empty cells? Or do I have to add <div>s for each cell? .container { display: grid;...
Jack Deeth's user avatar
  • 3,499
0 votes
1 answer
47 views

I have layout like image below: The jsx/html code: <article id="exhibition"> <section> <a href="#"> <h1>{exhibition[0].title}</h1> &...
flyingduck92's user avatar
  • 1,692
3 votes
3 answers
256 views

I'm building a site with multiple image galleries, each with a different number of images. What I wanted to do is to set a fixed number of rows(2, in this case) and it auto generates the amount of ...
elliotter's user avatar
-5 votes
1 answer
80 views

I want to create even spacing between my ul list: New Upload and Share. See example below. I use justify-items: space-between among other variations to try to evenly distribute my ul items but with no ...
lunarchild's user avatar
1 vote
2 answers
99 views

There is a known behaviour with cs grid where if the content of the cell is larger than the computed layout cell size, the cell expands. Meaning your grid is only a fixed size if the content is less ...
wforl's user avatar
  • 35
1 vote
1 answer
72 views

I’m trying to create a responsive layout using CSS Grid. The grid should have a header, main content, and a footer. I’m using grid-template-areas combined with auto-fit and minmax() to make the layout ...
Mohammad's user avatar
1 vote
1 answer
65 views

If I have a grid like this where an element spans 2 columns .parent { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 100px; grid-gap: 1rem; } .element.green { grid-column: 1 ...
tiago's user avatar
  • 13
4 votes
2 answers
103 views

In the following code when you click the box the caret loads automatically on the top. How come, though? Only when you press enter and then delete will it be in the center as in the process of the 2nd ...
David 's user avatar
  • 141
0 votes
1 answer
92 views

I'm trying to create a responsive 12 column layout, which should be fairly standard in these days. However, I've run into an issue I don't understand. I have this simple HTML just inside the <body&...
TheHvidsten's user avatar
  • 4,520
0 votes
0 answers
15 views

For example I would like the "reviews" row to be in the same position on each li no matter what size the heading tag is Unfortunately using min-height on the heading isn't an option as it ...
NoDachi's user avatar
  • 954
0 votes
1 answer
106 views

I have a grid column layout of: [full-width] [breakout] [content] [breakout] [full-width]. Within the [breakout] column I have an icon, and in the [content] column I have a section header, and ...
joshhhh's user avatar
  • 21
0 votes
0 answers
72 views

I have used css grid to create a flexible layout, where I am able to move divs into different slots from desktop to mobile. The issue I am having is if the content in my left div is long then the ...
pab's user avatar
  • 993
1 vote
1 answer
50 views

How to let 4's width look like 1 + 2 not now Because the same is divided into three parts, but it looks different! Why? I don't know much about grid box, is it the reason for gap? .grid-container { ...
user20862778's user avatar
1 vote
1 answer
120 views

I've made a layout which works in Chrome but not Firefox. In Firefox each grid item has a lot of internal space. I've tried a lot of the obvious stuff, but I can't see what the cause of the space is ...
alxrb's user avatar
  • 1,758
0 votes
0 answers
82 views

I have an ad system with two categories: TOP and BASIC. Ads are loaded from the backend in random order, returning a paginated object where TOP ads come first and BASIC ads come after. I want to ...
Alejandra Jaramillo's user avatar
0 votes
1 answer
53 views

I am trying to make a 3x3 menu in html/css with display:grid. Some of the squares in my menu need to be big plusses, so I tried changing the font-size of these plusses, this however changed the ...
Eneas Heyse's user avatar
1 vote
2 answers
102 views

I am working on a responsive layout, in the larger screens it will have 3x3 layout. The 1st column will be filled first. Once there are 3 items in the first column, the 2nd column will start to fill. ...
Sattyaki's user avatar
  • 416
3 votes
1 answer
120 views

We have a relatively simple grid/subgrid that we've distilled down to the following example. The goal is to have an image on the left spanning two rows, and then on the right a heading followed by ...
Chris Haas's user avatar
  • 55.7k
0 votes
1 answer
62 views

I’ve searched quite a bit, but none of the other resources matched the specific CSS structure I have. No matter what I tried, my layout never became responsive. I’m very new to CSS and still learning ...
JRichter's user avatar
1 vote
2 answers
98 views

I am trying to implement a layout with the following structure: Initial layout: A top bar that contains some boxes aligned centrally The main content area that has a sidebar, a large right box, and ...
ninja's user avatar
  • 385
1 vote
1 answer
80 views

I wrote a small site that queries a MongoDB instance containing prior brute-force attempts by IP to help with firewall management. Originally written with a table layout, I rewrote the site to use a ...
David C. Rankin's user avatar
-1 votes
1 answer
45 views

I can't figure out how to build an adaptive block with images up to 320px resolution without extra lines of code using grid. The problem is in the last line, where I need to place 2 pictures in the ...
Dmitro Master's user avatar
1 vote
1 answer
114 views

My Page In the above image, you can see track sizes are shown as I inspect the page, but as per my knowledge they are showing wrong track sizes. For example, in the first row track size it is showing ...
Warlock Gaming's user avatar
0 votes
1 answer
42 views

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CSS Grid<...
Warlock Gaming's user avatar
3 votes
2 answers
51 views

There are 2 child divs inside main parent div with "display: grid"; Hight of these 2 elements can be different. I know that i can align these elements vertically to bottom if i use "...
Aleksandar Pushevich's user avatar
0 votes
1 answer
89 views

I’m using CSS Grid with grid-auto-flow: column and grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)). I’ve explicitly set a fixed height on the container (height: 500px), but when one of the ...
meallhour's user avatar
  • 15.9k
1 vote
3 answers
144 views

I'm using CSS Grid to lay out a fixed-height container with 8 rows. Each row is defined using: grid-template-rows: repeat(auto-fit, minmax(100px, 1fr)); The container has a fixed height of 600px, and ...
meallhour's user avatar
  • 15.9k
2 votes
1 answer
66 views

I'm working with a CSS Grid layout and trying to evenly distribute rows inside a fixed-height container using: grid-template-rows: repeat(auto-fit, minmax(100px, 1fr)); Here’s the full CSS and ...
meallhour's user avatar
  • 15.9k
1 vote
3 answers
82 views

Requirements are as follows: Use either css or flex to do the following (which ever is most appropriate) and without the use of javascript: A Parent div which has 2 columns and one row The content of ...
Musaffar Patel's user avatar
0 votes
2 answers
46 views

It is my first attempt us use responsive design using grid templates, following some example code I found. However my elements just use one grid cell, even if multiple contiguous cells use the same ...
U. Windl's user avatar
  • 4,748

1
2 3 4 5
129