| Autor | Zpráva | ||
|---|---|---|---|
| codebreaker Profil |
#1 · Zasláno: 30. 7. 2020, 22:13:31
Dobry den.
situace: mam text ve formatu neco.txt, kde je hodne radku. Na jednom radku je typicky jen jedno slovo. Az na tom poslednim - ten je velmi dlouhy. otazka: Jak udelat, aby se po kazdem konci radku udelal linebreak a zaroven aby ten posledni radek byl zalomen linebreakem tak, aby nebylo nutne skrolovat doprava za ucelem precteni celeho posledniho radku. Posilam zdrojovy kod: <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;
}
</style>
</head>
<body>
<pre>
Skoda
BMW
Ford
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 unfortunetely 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 page 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>Prosim o radu. Dekuji. |
||
| Trejpa Profil |
#2 · Zasláno: 30. 7. 2020, 22:55:46
codebreaker:
pre { white-space: pre-wrap; } |
||
| codebreaker Profil |
#3 · Zasláno: 31. 7. 2020, 00:20:59
Děkuji Trejpo!
|
||
|
Časová prodleva: 6 let
|
|||
0