/    Sign up×
Community /Pin to ProfileBookmark

How to do an automatic linebreak

Hello. My problem is well explained in the source code text there. Could you please help me?

[CODE]<html>
<head>

<link href=”https://fonts.googleapis.com/css2?family=Bad+Script&family=Open+Sans:wght@300;400&display=swap” rel=”stylesheet”>

<style>
pre {
white-space: pre;
font-family: ‘Open Sans’;
font-weight: 300;
font-size: 15pt;
display: block;
unicode-bidi: embed;
width:100%;
}
</style>
</head>
<body>

<pre>
Skoda
BMW
Ford
Fiat
Mazda
Peugeot
This is awesome. I need to create a page break after the end of a line.

And now I am a very long line that unfortunately does not create a page break and for some reason I continue to the right until the line ends. I would like if the browser would create a line break so that all the text in my paragraph is actually displayed without a need to scrolling to the right. I tried to add the width of the pre element in the style to 100%. But it did not work.
</pre>

</body>
</html>[/CODE]

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@NogDogJul 30.2020 — I think you want white-space: pre-wrap; ?
Copy linkTweet thisAlerts:
@codewitchauthorJul 30.2020 — Yes, that it is. Thank you very much NogDog.
Copy linkTweet thisAlerts:
@VITSUSAJul 31.2020 — @codewitch#1621534 You got the solution, congratulations :)
×

Success!

Help @codewitch 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.1,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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