« Return to the main article
There's always a catch isn't there.
position:fixed elements are displayed on every page. Not really noticable in a
browser as a single page just scrolls. Printing changes things as multiple
pages are definitely possible.
The result in this example is a header of sorts. Unfortunately, this header
effect takes precendence over content "under" it--some content is hidden by the
Try a print preview to see the problem. For me (with Firefox), page 2 ends
"Chyba, że ze stołka!"
The first document listed on page 3 is:
"Look at this"
The position:fixed header essentially hides two documents on any page after the
first one. CSS specifically for printing should avoid the problem (i.e.
Side effects like these are something to be aware of anytime position:fixed is
used and there's any chance the page will be printed. I learned the hard way
of course. :-)
In any case, nice write Jake. Good stuff.