/    Sign up×
Community /Pin to ProfileBookmark

Taming preformatted text

Hello all.. I was wondering how to get some line breaks in on <pre>’s. I haven’t been able to get them to stay where I want them to. If I put overflow: hidden; half of the text is gona, if i use overflow: visible; then their text stretches into no man’s land, if I use overflow: auto; I get nasty scroll bars. Widths haven’t helped either. Does anyone know what to do, or know of a good, relevant article? And, for reference, one of my main preformatted page with issues: [url]http://projep.t35.com?03=chat[/url]

to post a comment
CSS

10 Comments(s)

Copy linkTweet thisAlerts:
@Paul_JrMar 28.2004 — [i]Originally posted by omega [/i]

[B]Hello all.. I was wondering how to get some line breaks in on <pre>'s.[/B][/QUOTE]

Hit the "Enter" key.
Copy linkTweet thisAlerts:
@Ben_RogersauthorMar 28.2004 — Ha, ha. You know what I mean, so that if a line can't fit, it doesn't stretch, it goes into the next line.
Copy linkTweet thisAlerts:
@Paul_JrMar 28.2004 — I'm not sure you can, without manually inserting the line break...
Copy linkTweet thisAlerts:
@Ben_RogersauthorMar 28.2004 — Really? That sucks... it seems there has to be some way.. I know that I could do it with PHP or JS, but that kind of kills the CSS styled ideal.... not to mention it'd be very inconvenient, installing a script for every page with <pre>formatted text... ?
Copy linkTweet thisAlerts:
@Paul_JrMar 28.2004 — I don't know for sure, so don't quote me on it.
Copy linkTweet thisAlerts:
@Ben_RogersauthorMar 29.2004 — [i]Originally posted by Paul Jr [/i]

[B]on it. [/B][/QUOTE]
woot. anyways, if anyone else knows how to get them to act normal...,
Copy linkTweet thisAlerts:
@ray326Mar 29.2004 — [i]Originally posted by omega [/i]

[B]woot. anyways, if anyone else knows how to get them to act normal..., [/B][/QUOTE]

Don't use <pre> if you want them to "act normal". <pre> is by definition "not normal."
Copy linkTweet thisAlerts:
@SamMar 29.2004 — but with a little server side work, you could easily insert newlines every x# of characters...
Copy linkTweet thisAlerts:
@Ben_RogersauthorMar 29.2004 — So, are you saying there's absolutely no CSS solution? Don't get into scripting now...
Copy linkTweet thisAlerts:
@SamMar 29.2004 — I was browsing the property index, and found nothing that looks like it would do the trick.
×

Success!

Help @Ben_Rogers spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...