/    Sign up×
Community /Pin to ProfileBookmark

Text Box – Scroll?

Hi all,

I have tried to achieve this with many scripts available on the net, but I can’t figure out how to scroll a block of text… This is not for news ticker where it’s on auto scroll…

I have a block of text (a long article for people to read) which is inside a table <td> tag. I need to be able to scroll this text with up down arrows for the user to controll.. I have seen this done in Flash but I need this on a static HTML page.

Your help is much appreciated.

GUNSA

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@Robert_WellockOct 11.2007 — Nesting in a table isn’t the best idea but if you purely want to scroll some text you could consider CSS. If you use JavaScript you are relying upon the user having it enabled.

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;title&gt;
Overflow to Scroll...
&lt;/title&gt;
&lt;style type="text/css"&gt;
&lt;!--
.auto {
border: 1px solid #ccc;
background: #f6f6f6;
height: 110px;
margin: 20px;
width: 500px;
overflow: scroll;
color: green;
}
--&gt;
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class="auto"&gt;
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Praesent imperdiet, nunc nec cursus sagittis, diam ipsum
mattis turpis, non blandit wisi quam ut dolor. Nullam quis
leo vitae orci tristique commodo. Donec mauris elit, mollis
vel, pharetra sit amet, sodales ac, nisl. Pellentesque
tempus nisl quis sapien gravida bibendum. Integer quis
libero sit amet odio lobortis rhoncus. Ut eu lectus. Proin
augue wisi, semper quis, dictum vitae, fermentum nec, nibh.
Vestibulum scelerisque, diam sed mattis mollis, elit magna
aliquam sem, eget imperdiet felis pede at metus. Curabitur
pharetra imperdiet augue. Duis dignissim dapibus mauris.
Etiam quis quam ac nibh commodo porttitor.
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;

If you mean automated then that's different.
Copy linkTweet thisAlerts:
@gunsaauthorOct 11.2007 — Hi Robert,

Thanks for the quick post... Well, that was quite easy and worked well for what I had in mind.... Thanks a bunch...
Copy linkTweet thisAlerts:
@Robert_WellockOct 11.2007 — No problem.
×

Success!

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

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

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