Archived topic
Theme is showing wrong number of columns in posts and pages
1 reply · Started by Marieke on August 29, 2019
When I add a block on a page or post that contains multiple columns, such as a block with woo-coommerce products or gallery-images the theme shows the wrong amount of columns. When I switch to other wp-themes it shows correctly so it is really the generatepress theme that is causing this problem.
When I enter 4 columns, the theme shows 3 columns. When I enter 6 columns, it shows 5. On mobile it shows only 1 column when I entered 3, with a lot of white space on the right. I played with pretty much all settings I could find, but nothing works.
I've tried to suggested grid-plugins but those don't work in Gutenberg.
Hi there,
Grid items that have padding causes the element to expand in width which breaks there grid. Seeing a lot of lazy plugins that don't bother to include a box-sizing property to stop this from happening. Other themes apply this to every element on the site, which is not the most efficient way of doing things. But to replicate that you can try the following CSS:
html {
box-sizing: border-box
}
* , :after, :before {
box-sizing: inherit
}