scrolling text on a web page

Associate
Joined
28 Sep 2003
Posts
747
Location
lincs
hi all, is there some software or a way in dreamweaver or an easy way to add a box onto a webpage, where in it, is text which you can scroll up and down by means of a slider on the right handside of the box.

similair to a standard web page

im not good at script

any links to a tutorial?

cheers guys cocker92
 
You could do it with a div and css.
Wrap whatever text you want to be scrollable in a div with an ID eg.
Code:
<div id="scroll">[I]Blah blah some text here[/I] </div>
Then in your css add:
Code:
#scroll {
width:100px;
height:100px;
overflow:auto;
}
Obviously you put whatever you want for the width and height but that should force the div to stay that size and if the text in the div fills more then 100x100px (or whatever size you put) it'll become scrollable.

hope I explained that ok..
 
The div tag idea is better (why didnt I think of that) but the drawback is the content inside is static and cannot be changed where as the iframe acts like a browser window inside a browser window and therefore the iframe can navigate to different addresses or be reloaded without reloading the whole site. but if that is some thing you dont need then the div tag would be best

p.s. im sure in ajax you can reload the content but for simlicity we wont go there.
 
You could do it with a div and css.

i understand the first bit (div tag) but i dont understand what you mean about the css bit (im sorry but i did say i dont know much about script)

:rolleyes:

you say in css add

#scroll {
width:100px;
height:100px;
overflow:auto;
}

where do i do this in dreamweaver 8??
 
CSS = Cascading Style Sheets, which is either some styling in the <head> of your HTML page eg:
Code:
<head>
<style type="text/css">
h1 {color: red}
h3 {color: blue}
</style>
</head>

or, as is more commonly used, a seperate CSS page (eg style.css) that that you can link to 1 or more pages and contains all your code for styling.
This is a good place to learn all about CSS, I suggest you start there and find out how it all works :)
 
Back
Top Bottom