Mike Lewis
Programmer
I have a page with a fixed-width container (width is defined in pixels).
I sometimes want to display program code within that container, so I style it with a <pre> tag. That works OK, so long as the lines of code aren't too wide. So I added an overflow:auto rule to the <pre> tag. Now, if a line of code is wider than the container, I get a horizontal scroll bar, which solves the problem.
But I also have a separate style sheet for printing. Obviously, overflow:auto has no effect when printing. The wide lines of code are simply truncated.
Is there any way of dealing with this problem? Any way to display <pre> text on the printed page, without wide lines being truncated? Obviously, this can only work if the lines are wrapped in some way, but I can't see any way of doing that.
Thanks in advance for any suggestions.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips, training, consultancy
I sometimes want to display program code within that container, so I style it with a <pre> tag. That works OK, so long as the lines of code aren't too wide. So I added an overflow:auto rule to the <pre> tag. Now, if a line of code is wider than the container, I get a horizontal scroll bar, which solves the problem.
But I also have a separate style sheet for printing. Obviously, overflow:auto has no effect when printing. The wide lines of code are simply truncated.
Is there any way of dealing with this problem? Any way to display <pre> text on the printed page, without wide lines being truncated? Obviously, this can only work if the lines are wrapped in some way, but I can't see any way of doing that.
Thanks in advance for any suggestions.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
Visual FoxPro articles, tips, training, consultancy