29
.class {    -webkit-column-count: 4;
    -webkit-column-gap: 0.25in;
    -webkit-column-rule-width : 1px;
    -webkit-column-rule-style : solid;
    -webkit-column-rule-color : #eee;
}

So it works perfectly in Safari, but when printing, the 4 columns turn into a single column spanning multiple pages. Any ideas?

putorti
  • 353
  • 5
  • 8
  • 2
    This is very frustrating. I've been working on a solution for a few hours now and it looks like I'll have to take a different route entirely. The WebKit implementation (including the latest build, which I just checked, Chrome and wkhtmltopdf) have CSS3 columns turned off (see Peter's answer). Firefox actually renders them correctly, but I have no idea how to access that efficiently programatically :-( Bad times. – Hut8 Oct 06 '13 at 11:58
  • 3
    Related Chromium bug: https://code.google.com/p/chromium/issues/detail?id=99358 – Damien Nov 03 '14 at 16:57

5 Answers5

33

It seems like the developer of columns in Webkit (Dave Hyatt) disabled columns when printing, because he couldn't implement page breaking properly: https://www.webkit.org/blog/88/css3-multi-column-support/#comment-16854

I'm surprised that in more than 5 years, no solution has been found...

Peter
  • 2,874
  • 2
  • 31
  • 42
2

It's worth noting that in Firefox 31.0 on OSX these do print correctly with the below style. However it's still broken in WebKit (safari/chrome).

.column_wrapper {
    -webkit-column-count: 3; /* Chrome, Safari, Opera */
    -moz-column-count: 3; /* Firefox */
    column-count: 3;
}
chmullig
  • 13,006
  • 5
  • 35
  • 52
0

It's not working in chrome, firefox. you have only one temporary solution. use IE for multi column print

Vishal Patel
  • 635
  • 6
  • 12
0

The only way to print in columns is to print with FireFox or IE... and use the un-browser prefixed versions so that FF nad IE can read the columns CSS

-1

the print and web page are 2 different things. So try to use diff css for print pages and try to see

page-break css properties. it will come in handy


Hacker
  • 7,798
  • 19
  • 84
  • 154