Questions tagged [grid-layout]
Grid layout is used to align content into columns and fields. Unlike table layouts, grids are composed of guide lines so that elements positioned relative to the grid can have drag and drop behavior.
grid-layout
2,194
questions
17
votes
1
answer
15k
views
CSS grid layout: support grid-area for IE11
Сan someone tell me how to make this example work in ie11? I checked the documentation and -ms- prefix did not help
#page {
display: -ms-grid;
display: grid;
width: 100%;
height: 250px;
...
17
votes
1
answer
11k
views
CSS grid, remove gap when area is optional
I'm starting using CSS grid (pretty amazing!). I'm starting with the most basic layout: mobile layout. Also, I'm using media queries to change the layout as the web page grows.
For now, my layout ...
16
votes
1
answer
30k
views
Java Swing GridLayout "Cell span"?
Is there a way to make a single element in a Grid layout take up more than 1 location in a grid. Example: I want to create a textbox that takes up an entire grid row, is there some way to do this?
16
votes
2
answers
28k
views
Android: How to create a GridLayout [not GridView] programmatically?
I am developing a "match the following" application. The xml used for the application is as follows:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/...
15
votes
1
answer
41k
views
CSS grid items based on minimum width and percentage
I currently have a div style as a grid display. The grid-template-columns are each 1/3 of the body. However, I would like to limit each box to a minimum width of, say, 200px. This way, on mobile I won'...
15
votes
5
answers
126k
views
Load arrayList data into JTable
I'm trying to set items from a method called FootballClub and so far it's fine.
but then I created an arrayList from it and I somehow can't find a way to store this information into a JTable.
The ...
15
votes
1
answer
48k
views
Tkinter grid fill empty space
I did search for a lot of examples before posting but still can't properly use the tkinter grid.
What I want:
my code:
import tkinter as tk
from tkinter import ttk
root = tk.Tk()
b1 = ttk.Button(...
15
votes
1
answer
8k
views
Possible to add offset to the right of an element in a Zurb Foundation 4 grid?
According to Foundation's docs on the grid component, I can essentially make 1 or more grid columns a space using their offset classes:
<div class="row">
<div class="large-1 columns">...
15
votes
7
answers
33k
views
Auto fit according to screen size in grid layout android
I have created a grid containing full of texts. I want the text to auto-fit according to screen size. I have tried the following code,
DisplayMetrics displayMetrics = context.getResources()....
15
votes
3
answers
21k
views
Top navbar overlaps with main content
I'm converting my landing page from Bootstrap to Semantic-UI. The page has a position fixed top navbar. The main content is divided in two columns (3-cols and 9-cols). The left column is used to show ...
15
votes
4
answers
15k
views
Masonry layout with css grid
I'm trying to create masonry layout using css grid layout. All items in grid have variable heights. And I don't know what items will be. So I can't define grid-row for each item. Is it possible to ...
15
votes
1
answer
7k
views
Responsive Grid Layout Framework [closed]
I want an easy to use grid framework for my current web project. These are the features i would appreciate:
fluid grid layout: boxes that can be aligned horizontally (side by side), each having the ...
14
votes
5
answers
48k
views
How to remove border around buttons?
I have a JPanel with the GridLayout. In every cell of the grid I have a button. I see that every button is surrounded by a gray border. I would like to remove these borders. Does anybody know how it ...
14
votes
2
answers
12k
views
How to make Android GridLayout compatible to older version?
New GridLayout for Android 4 is good. Both in terms of code maintainability and performance.
I wanted help with backward compatibility for GridLayout for older version. Waiting for official ...
13
votes
1
answer
21k
views
Generate table with rowspan using Angular 2
I have a data structure like this:
[
"category1": {
"name": "Cat 1",
"competences": [{
"name": "Comp 1",
"users": [{
"name": "user1",
"level": 99,
}, {
...
13
votes
1
answer
83k
views
Create a Chess board with JPanel [duplicate]
I have a simple Chess board in a JPanel with GridLayout(8,8) as layout manager.
I am trying to add panels for the fields' column name and row number.
Right now I've created another panel with ...
13
votes
1
answer
13k
views
Don't understand how to use GridLayout.spec()
This GridLayout is going in my app that has a lot of levels. Each level has a different number of rows and columns. I assume that this GridLayout would be my best bet to use to satisfy my needs. ...
12
votes
3
answers
10k
views
Dynamic height of TextView within a GridLayout
I have a problem using GridLayout using library compatibility (not tried without). I am using app:layout_gravity="fill_horizontal" instead of android:layout_gravity="fill_horizontal" but all the ...
12
votes
2
answers
59k
views
Tkinter.grid spacing options?
I'm new to Tkinter, and I tried creating an app with the grid layout manager. However, I can't seem to find a way to utilize it the way I want to. What I need to do is simulate a grid full of 'cells' ...
12
votes
3
answers
16k
views
Specify the columns to start from the right with CSS Grid
I'm trying to change my Flexbox layout to the new display: grid, and I have three columns.
<div class="grid">
<div class="three wide column"></div>
<div class="two wide ...
12
votes
1
answer
25k
views
Single full-width column in row with twitter bootstrap grid
When using bootstrap's grid, what is the best way to markup a single full-width column in a row?
Do you have to use container and row to hold the column (.container > .row > .col-xs-12 > ....
11
votes
2
answers
4k
views
IntelliJ: Getting GridLayout work
I try to use GridLayout in my App, but it wont work.
I used this Tutorial: IntelliJ and android.support.v7.widget.GridLayout
But it still wont work.
I get the following Error:
error: No resource ...
11
votes
6
answers
34k
views
Pushing and Pulling Columns - Bootstrap 4
This is what I need:
Desktop: B A
Mobile:
A
B
Here is my HTML:
<div class="row">
<div class="col-md-7 col-sm-7 push-md-5">
A
</div>
<div class="col-md-...
11
votes
2
answers
14k
views
Arrange multiple (32) .png files in a grid
I've been pulling my hair out for the past week trying to figure out elementary R coding but can't seem to get anywhere (haven't used R since 2013 not that its a great excuse).
All I want is a 4x8 ...
11
votes
2
answers
8k
views
CSS3 column layout with dynamic number of columns
I have a set of images that I want to display in the following pattern:
[1] [4] [7] [10] [13]
[2] [5] [8] [11] ...
[3] [6] [9] [12]
I know that I can always manually group 3 images into a div....
11
votes
3
answers
1k
views
How does the TED Talk home page organise the grid of videos?
I've been trying to work out exactly how the TED Talk homepage works. Leaving aside all the animation rubbish, I find the way that the boxes are organised is really fascinating.
At first glance it ...
10
votes
1
answer
8k
views
GridLayout from support library does not show 2 rows on Android 2, onChildVisibilityChanged Error
Has anybody gotten the support library to render a grid layout correctly in Android 2? Instead of 2 rows and columns I get a single row on the screen and see this error in the logcat output:
Android ...
10
votes
3
answers
18k
views
Bootstrap 3 and .col-xs-* -- Do you not need rows of 12 units?
I'm a little confused by the Bootstrap 3 documentation and thus usage of the .col-xs-* classes.
The docs for Grid Options say that all of the grid systems use 12 columns.
If you take a look at ...
10
votes
3
answers
31k
views
Is there any way to force GridLayout to leave empty cells?
I have a JTabbedPane with 2 JPanels set to GridLayout(13, 11). The first JPanel has enough of the cells filled out that it leaves the empty cells.
The second JPanel has significantly fewer cells ...
10
votes
2
answers
3k
views
How to align separate Grids created via templates along their columns / rows?
I thinks that in this case A picture is worth a thousand words:
XAML:
<Grid>
<ItemsControl ItemsSource="{Binding Persons}">
<ItemsControl.ItemTemplate>
<...
10
votes
5
answers
24k
views
How to add offset material-ui Grid
I'm trying to make a small 'Item added' popup dialog on material-ui using it's Grid system. But i can't figure out how to add offset to the Grid. I'm trying to achieve something similar to Bootstrap's ...
10
votes
1
answer
14k
views
How to get items to stretch to fill width?
.container {
display: grid;
grid-template-columns: repeat(auto-fill, 100px);
grid-gap: 3px;
border: 1px solid green;
}
.item {
border: 1px solid red;
height: 50px;
}
<div ...
10
votes
1
answer
7k
views
Is it possible to use grid layout to make a table with frozen/fixed header
The fact that grid layout allows me to build a table in CSS in a completely different way, I was trying to figure out a way to make a grid layout where the first row stays in view, whilst the rest ...
10
votes
2
answers
10k
views
How to place one widget over another in Qt
i have a window in Qt, on that i am drawing a picture. now i want to place the progressbar over it.
how can i do that?..
steps i am following to do
Create a window,
Draw picture in paint event of ...
10
votes
2
answers
7k
views
HTML grid layout disrupted by SVG child element
I'm trying to make a page with a simple 3x3 grid layout: header top, footer bottom, two sidebars, and the main display. Everything works fine until I add the SVG element that should fill the main-...
9
votes
3
answers
62k
views
Text align in JLabel [duplicate]
I've got GridLayout-JPanel. In every cell there is a JLabel with some String. How can I right-align this text in my cells?
9
votes
1
answer
4k
views
Why is my Grid Tapped event not being called?
It's true that I'm not actually tapping in the simulator - as my dev machine is not touch-enabled - but I don't think that's the problem, as my clicking within the grid should fire the event.
Here's ...
9
votes
3
answers
14k
views
Huge whitespace around plotly chart in bootstrap grid
I have a .Net application in which I am trying to create a graph using bootstrap.js and plotly.js.
I have a problem with a huge white-space in my grid when I create a responsive chart. I have figured ...
9
votes
4
answers
28k
views
Create a user-defined gap between two Bootstrap columns
I want to create little panels/dashboard for my interface. In my case I want to have two panels like so
+-------------------------------+ +-------------------------------+
| ...
9
votes
2
answers
7k
views
How do make columns in a grid "space-evenly" like with flexbox?
I have this grid CSS
.grid {
display: grid;
grid-column-gap: 50px;
grid-template-columns: repeat(3, 1fr);
}
which is sitting in a div with width: 500px
but I noticed that the first item ...
9
votes
4
answers
9k
views
Vaadin - Expand components in Grid Layout in Vaadin
I am doing my project in Vaadin 6. In that, I have integrated the components in a Grid layout. I have attached a image with this. It resembles my Project layout. It is similar to eclipse. So, The ...
9
votes
2
answers
58k
views
Padding to CSS Grid
I am a beginner to HTML and CSS, so I've been experimenting with the different systems like Flex and CSS Grid. I've run into an issue where I can't add padding to an element inside a Grid Column. Is ...
9
votes
4
answers
25k
views
Eclipse giving an error of android.support.v7.widget.GridLayout failed to instantiate
I have tried to incorporate the GridLayout from the support library, but it is not working. My target build is for API version 10. The XML code I am using is shown below:
<?xml version="1.0" ...
9
votes
2
answers
13k
views
How does one fill a QGridLayout from top-left to right?
I would like to fill a QGridLayout with QWidgets. The QWidgets need to appear in a top-left to top-right fashion and proceed to fill the down downwards after each row is filled with QWidgets. An ...
9
votes
1
answer
37k
views
Vuetify grid layout - How to fill height of element in grid
I'm trying to create a grid layout but am having trouble.
The layout I'm trying to create is attached in the image below. It's easier to show than explain.
A side panel card layout that will be ...
9
votes
3
answers
12k
views
Using fixed position with a grid layout framework
So I am creating a web page, where the menus on the left hand side are fixed (They follow you when you scroll up and down the page). I am currently using The Grid layout: Foundation (by zurb) http://...
9
votes
1
answer
6k
views
CSS how to only show 1 row and hide the others?
I have a nav at the top of my page.
In it I have 5 market stocks for 5 different companies. I want to display the 5 at full width but as the window gets smaller, I basically want behavior which will ...
9
votes
3
answers
895
views
Auto-growing margins when screen width get stretched
I have a list (<ul />) that I try to display as a grid. The cells have a fixed width (let's say 100px): the number of cols and rows depends then on the screen resolution.
When the screen has a ...
8
votes
6
answers
13k
views
Invisible components still take up space JPanel
I have a series of components underneath each other in a JPanel set as a GridLayout.
I need to temporarily hide the components but setVisible(false) doesn't cut it, because there is still an empty gap ...
8
votes
4
answers
18k
views
Flexbox, responsive grid of square divs maintaining aspect ratio
I'm trying to create a 2x2 grid with divs. Some of the divs might contain an image, but it will probably be set as a background, with the option background-size: cover.
Here's the pen I created: http:...