Skip to content
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

CSS column-count property results in the 1st column being lower than the others #295

Open
thoughthollow opened this issue Sep 16, 2022 · 1 comment

Comments

@thoughthollow
Copy link

thoughthollow commented Sep 16, 2022

Hello,

When using the CSS column-count property on a div, the 1st column ends up one line lower than the others.

Here's some example code, done by adding a div with the style "column-count: 2" to the intro of the Paged HTML Document template.
image

Here's the result:
image

I've tried adding a bunch of other properties to try to fix it to no avail:
image

I even tried using some javascript to fix it, but no luck also:
image

Any help you could give would be much appreciated!

@thoughthollow thoughthollow changed the title CSS column-count property results in the 1st column being higher than the others CSS column-count property results in the 1st column being lower than the others Sep 16, 2022
@thoughthollow
Copy link
Author

Hi,

I managed to resolve the issue by first making a class (".reportcols") which would apply the style I wanted ("column-count:2; column-fill: balance;").
Then I applied another line of code that would target all elements under it, and apply a margin top of zero pixels.

Like so:

.reportcols { 
  -webkit-column-count: 2;
  -moz-column-count:2;
  column-count:2;
  -webkit-column-fill: balance;
  -moz-column-fill: balance;
  column-fill: balance;
}


.reportcols * {
  margin-top: 0px;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant