David King

full stack developer

All Blog Articles

Prev « GF Buckwheat parcels, they're flippin' awesome! (recipe) Next » CultureHackNorth - poke that!


CSS a tip for printing :-)

04 Nov 2011

Super quick tip today, if you want to style your pages for printing then you really must add this to your arsenal of snippets:

.selector {
	page-break-inside: avoid;
	page-break-after: auto;
}

which stops elements from being sliced in half when they get printed.

Shows a block element split over two printed pages Shows the same element but the whole thing has dropped onto the second page
before and after

Prev « GF Buckwheat parcels, they're flippin' awesome! (recipe) Next » CultureHackNorth - poke that!