media='print'

I’m a little disgruntled at the quality of the css media=print functionality of both Firefox and IE. Neither seem to work right. My problem is that I have a lengthy page that has 12 large calendars on it and the calendars are being split and part is printing on one page and the other half on the next page. My initial solution was to just try an add a margin or padding at the bottom of the tables which would give them just enough extra room to fit nicely on the pages. This worked fine in Firefox most of the time. I say most of the time because depending on the year and months they might not exactly fit in the page like I expected but about 90% of the time it does.

IE didn’t even recognize margin-bottom or padding-bottom for the class the calendar tables were using. This initially made me think that IE wasn’t even recognizing the media=print but I eventually realized that it just didn’t like margins or padding on the tables when printing them. Then I ran across page breaks. This worked great in IE and was exactly what I was looking for. Unfortunately, I couldn’t get Firefox to notice the page-break-after so I ended up combining my two solutions and got them both to somewhat look ok.

Comments are closed.