/    Sign up×
Community /Pin to ProfileBookmark

Controling <pre></pre>?


Is it somehow possible to give <pre></pre> a max width? Im asking because im importing text from mysql database and there are some very long lines and <pre> does automaticly change line when it reaches in max width of an table:

<table class=”details_main”>
<td class=”details_report”><pre class=”details_test”><?=get_report($_GET[‘id’]);?></pre></td>

hope you understand my request.

to post a comment

4 Comments(s)

Copy linkTweet thisAlerts:
@FangFeb 03.2007 — &lt;pre style="width: 10em; overflow: scroll;"&gt;Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem.&lt;/pre&gt;
Copy linkTweet thisAlerts:
@JJohnsenDKauthorFeb 03.2007 — is'nt it possible to make it automaticly chance line insted of make a scrollbar?
Copy linkTweet thisAlerts:
@FangFeb 03.2007 — If you want it to do that why put it in a <pre>?
Copy linkTweet thisAlerts:
@jalarieFeb 05.2007 — Fang, you helped me, too! Thank you.


Help @JJohnsenDK 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 7.21,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ,
analytics: Fullres

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: Anonymous,
tipped: article
amount: 1000 SATS,

tipper: Anonymous,
tipped: article
amount: 1000 SATS,

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