Forum Moderators: not2easy

Message Too Old, No Replies

Printing issues with Word Wrap & CSS

screen different from printing

         

txbakers

6:06 pm on Aug 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a routine where lists of names are populated dynamically and put into <div> tags for absolute position.

On the screen, the names look like this:

Harvey Rabbit
John Hancock
Johnny BeeGood

When I print, the names look like this:

Harvey
Rabbit

John
Hancock

Johnny
BeeGood

The CSS line looks like this:

<div id="s8745874" style="position:absolute;left: 530px; top: 273px; color:navy; padding:6px; text-align:center">John Hancock<br>Bass<img src="nimages/spacer.gif" alt="" height="1" width="1"></div>

I have tried to increase padding but tht didn't help.

Is there another property I need to set to avoid the wrapping?

encyclo

6:31 pm on Aug 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I haven't ever tried it in a printing context, but you could try adding the CSS rule
white-space:nowrap;
to your
div
- that might work for you.

createErrorMsg

7:11 pm on Aug 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried giving it an explicit width?

txbakers

7:16 pm on Aug 24, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



whitespace:nowrap = purrrrrrrrfect!