2 replies [Last post]
RogWilco
Offline
newbie
Last seen: 12 years 49 weeks ago
Timezone: GMT-8
Joined: 2007-12-18
Posts: 2
Points: 0

I'm trying to create a "printable" version of a page, and everything is working rather well. However, I can't for the life of me get a table to stretch to the full width of a page. Using "width: 100%" is ignored completely when the page is printed (though it will stretch when in the browser).

If I specify a static width, it will work as expected, but percentages just seem to be ignored. I'm guessing this is a well known problem, but I can't find any info on this issue. Any assistance is greatly appreciated!

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 1 day 13 hours ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9774
Points: 3856

I haven't run into this

I haven't run into this issue, myself, but that is likely due to seldom using {width: 100%;} for anything. Smile

When setting rules for print, it is quite appropriate to use "real" dimensions, eg. {width: 6in;}.

It would be my guess that percentages are problematic for print.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

RogWilco
Offline
newbie
Last seen: 12 years 49 weeks ago
Timezone: GMT-8
Joined: 2007-12-18
Posts: 2
Points: 0

Strange, specifying a static

Strange, specifying a static width didn't seem to do the trick either. It seems my previous suggestion that a fixed width would work is not true. This is a weird one...