-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-column layout: elements are shifted rightwards from the center #12640
Comments
Thinking this is the same issue: #12199 |
I want to add a screenshot for clarity. I followed the steps provided and here is how a columns block with three columns in the editor and the front end from my test: Tested with WordPress 5.0 and the Twenty Seventeen 1.8. I'm not sure this illustrates the problem though, because I don't see a significant shift. Can you let me know if I'm not looking in the right place? Also, can you note the theme and theme version number you are testing with? Note: when you said "set up a multi-column layout" I assumed you meant a columns block. I wasn't 100% sure that's what you meant though, so let me know if that's not right! |
Hmm strange... i copied the full width screenshots first and then the narrower ones but system mixed them up. |
I found that in my first test I happened to be using a theme that already accounts for this issue and has made style adjustments to remove the right-margin from the last column (Twenty Nineteen 1.0). I re-tested using an old version of Twenty Fifteen (I used 2.0 and the latest version is 2.1) with the following steps and I could see the problem:
Note: earlier, I tested with Twenty Nineteen 1.0 on a first pass and it already has Thank you for helping me to clarify the issue @idea--list! |
@designsimply |
i have opened issue at theme repo, but now i think it belongs here: WordPress/twentynineteen#742 |
@idea--list apologies for not being more clear. I was noting that I was using the default theme and didn't realize at first that they had made an adjustment in the theme itself. Work is ongoing in #12199 and I found the issue was also reported at #13035 and I would like to close this issue in favor of that one. |
Describe the bug
Multi-column layout shifted rightwards.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The layout should be centered exactly
Desktop (please complete the following information):
Fix
Open the file gutenberg/build/block-library/style.css find the following part in it:
@media (min-width:600px){.wp-block-column:nth-child(odd){margin-right:32px}
.wp-block-column:not(:first-child),.wp-block-column:nth-child(2n){margin-left:32px}
.wp-block-column:not(:last-child){margin-right:32px}}
To solve the display issue, add these lines to the styles.css of your active theme:
@media (min-width:600px){.wp-block-column:nth-child(odd){margin-right:0px}
.wp-block-column:not(:first-child),.wp-block-column:nth-child(2n){margin-left:0px}
.wp-block-column:not(:last-child){margin-right:0px}}
After that the content is centered exactly just as expected
Should be addressed as fast as possible.
The text was updated successfully, but these errors were encountered: