Element doesn't break properly firefox

40 Views Asked by At

I have this css code:

.parent {
  column-count: 2;
}
p, h2, h3, h4, h5, h6 {
  page-break-inside:avoid;
  break-inside:avoid;
}

and the html:

<div class="parent">
 <p>lorem ipsum and so on</p>
</div>

Chrome v80 (All nice and well):

enter image description here

Firefox v74:

enter image description here

These tricks don't work. In the firefox doc's it says it should work. But it just doesn't. What am I doing wrong? Striped codepen

1

There are 1 best solutions below

2
On

add margin:0; at least to p

p{margin:0}