Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Are there any reference to create a 4-column grid? Grid settings for first, middle and last columns?
Comments
Comment #1
danielhonrade CreditAttribution: danielhonrade commentedYou can use 12, 16, 24, these are all divisible by 4
1) just edit yourtheme.info, turn on grid
2) edit regions.php, add values to grid for sidebars
Comment #2
coupet CreditAttribution: coupet commentedYes, but each grid shows up in different rows.
- 4 columns (12) with grids of size 3
Looking for options to show 4 columns grids-3 in one row.
Comment #3
danielhonrade CreditAttribution: danielhonrade commentedfor regions, create custom regions in regions.php
like, column1, column2, column3, column4, give each grid => 3 value
then on page.tpl.php, you do like
you can also do that on blocks in 1 region, have 4 blocks in 1 wide region, just add necessary grid classes.
Comment #4
coupet CreditAttribution: coupet commentedthe regions are aligned vertically (top/bottom), not horizontally(left/right) as expected.
firebug shows each region is assigned an id and class
I am trying to create 4 equal columns in one row.
Comment #5
danielhonrade CreditAttribution: danielhonrade commentedis it online? I can only help you further if I can see it.
Btw, did you turn on the grids on yourtheme.info?
Comment #6
coupet CreditAttribution: coupet commentedlink sent in contact form
Comment #7
danielhonrade CreditAttribution: danielhonrade commentedHi,
add clearfix to wrapper:
add this to your css:
Comment #8
coupet CreditAttribution: coupet commentedworks great, but having same issue when creating a row with two columns
Comment #9
danielhonrade CreditAttribution: danielhonrade commentedHi,
the same thing actually applies, you just have to put on the new regions:
regions.tpl.php, grid = 6
and the css, you just have to rename the classes to the new the regions, but basically same properties, like the float, margins
Comment #10
coupet CreditAttribution: coupet commentedWorks perfectly with rows of 2, 3 and 4 columns. I was trying override 24 grid option, but that requires margin adjustments.
Comment #11
danielhonrade CreditAttribution: danielhonrade commentedon 24, the margins would be just 5px instead of 10px
Comment #12
danielhonrade CreditAttribution: danielhonrade commented