/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Scrolling issue

I’m having a problem when I try to make really long lines, when using simple text the horizontal scroll is working fine, the text remains on the same line and simply scrolls to the right.

When the text has html tags in it, the browser does not want to retain the text in a single line, and jumps a line.

The following code demonstrates the problem:

[code]
<html>
<body>

abcddasdasdasdasdasdasdasdasdasdasdasdasdasabcddasdasdasdasdasdasdasdasdasdasda4156415615645646456456456465sdasdasabcddasdasdasdasdasdasdasdasdasdasdasd<b>some more stuff here</b> asdasabcddasdasdasdasdasdasdasdasdasdasdasdasdas32543rewft5ryhrhjutyfdfdsdfkhjgfderthyfdrgtfdrwefde4rtgrdfertgfdasdsadasdas(<font color=”#ff0000″>Don’t jump, damn it!!!</font>)dasdadasdas;
<br><br><br><br><br>
werthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdf
</body>
</html>[/code]

Is there anyway to avoid this? to make the first line with the html tags to scroll normally just like the second line?

Note: The problem exists in IE, Firefox, Safari and Opera.

Thank you.

P.S:
Please don’t ask useless questions like why do I need something like that?
This is a simple display of a problem I’m having in a web based editor.

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@LeeUAug 12.2008 — It's because you have a space in the second line, after "Don't". If you use a non-breaking space, e.g., [COLOR="Red"]&nbsp;[/COLOR] instead of the actual space, it will work. So like this:
[CODE]
asdasabcddasdasdasdasdasdasdasdasdasdasdasdasdas32543rewft5ryhrhjutyfdfdsdfkhjgfderthyfdrgtfdrwefde4rtgrdfertgfdasdsadasdas(<span style="color=#ff0000;">Don't&nbsp;jump,&nbsp;damn&nbsp;it!!!</span>)dasdadasdas;[/CODE]
Copy linkTweet thisAlerts:
@marcusamiAug 12.2008 — or you could use

<pre></pre>[/QUOTE]
which holds the exact format of the text
Copy linkTweet thisAlerts:
@the_dpauthorAug 12.2008 — LeeU, Thank you for the reply.

I changed the page, replaced all spaces with &nbsp; and you were right, it did solve the issue with Firefox and IE, but Safari is still breaking the line after the </font>

&lt;html&gt;
&lt;body&gt;

abcddasdasdasdasdasdasdasdasdasdasdasdasdasabcddasdasdasdasdasdasdasdasdasdasda4156415615645646456456456465sdasdasabcddasdasdasdasdasdasdasdasdasdasdasd&lt;b&gt;some&amp;nbsp;more&amp;nbsp;stuff&amp;nbsp;here&lt;/b&gt;&amp;nbsp;asdasabcddasdasdasdasdasdasdasdasdasdasdasdasdas32543rewft5ryhrhjutyfdfdsdfkhjgfderthyfdrgtfdrwefde4rtgrdfertgfdasdsadasdas&lt;font color="#ff0000"&gt;Don't&amp;nbsp;jump,&amp;nbsp;damn&amp;nbsp;it&lt;/font&gt;dasdadasdas
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
werthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdfwerthyjuijugfsdfgjjgfdresdrfhjhgvcdxesghjhgfdesdrtfgyhujiuhygtfrhuijhyufredrtfhyujhbgfdsdf
&lt;/body&gt;
&lt;/html&gt;


Thank you.
Copy linkTweet thisAlerts:
@LeeUAug 12.2008 — A quick check on Google doesn't turn up too much to solve the problem. Looks like it might not be fixable in Safari. Maybe someone else has a fix....
Copy linkTweet thisAlerts:
@the_dpauthorAug 12.2008 — Thanks guys.

I've tried the <pre> tag... tricky but I think it gives me the solution I need.
×

Success!

Help @the_dp 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 5.25,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...