html - Manual wrapping with pre -
i'm trying design page display email messages. have in pre
white-space: pre
:
>> donec tincidunt lobortis orci, cursus dui ullamcorper >> vel. praesent vel enim et lectus aliquet laoreet. in tempus >> sodales.
now, when screen-y small , overflows, don't want use overflow: auto
. instead, want wrap automatically this:
>> donec tincidunt lobortis orci, cursus >> dui ullamcorper vel. praesent vel enim >> et lectus aliquet laoreet. in tempus >> sodales.
i wouldn't mind using :before
if able select text in page , copy email message as-it-is.
okay, let's first try solve simpler version of problem: let's there no ">> " prefix in front of each line. can use white-space: normal
, when copy out text, 1 line without line-breaks , undesirable. so, how browser wrap text without losing ability copy out line-breaks displayed?
you use :
pre { white-space: pre-wrap; white-space: -moz-pre-wrap; /* mozilla */ word-wrap: break-word; /* internet explorer */ }
but takes care of >> bullet... fiddle here
Comments
Post a Comment