Montana Jones

Montana n: A state of the northwest United States bordering on Canada. Admitted as the 41st state in 1889. The fourth largest state in the union, it includes vast prairies and numerous majestic mountain ranges.
Syn: Treasure State, Big Sky Country, Last Best Place.

Jones n: slang. An addiction or very deep craving.

Tuesday, January 16, 2007

Print style sheet detail

Nerd Alert. This post is for geeks only.

When assigning a print style to your web pages (You do tweek your style sheets for printing, right?) be advised of an undocumented issue.

The "page-break-before" and "page-break-after" style elements will not work when applied to the <br /> or <hr /> tags. I have tested this in FF2 and IE7; mileage may vary on other platforms.

The workaround/cludge I ended up using looks like this:

<div style="page-break-after:always;"><hr /></div>

Yes, I know. Inelegant and ugly but I blame the browser makers.

I hope this helps to prevent someone else going through the hours of hair pulling I had to deal with.

Labels: , , , , , , , , , , ,