word_bird — 2010-02-02T14:58:01-05:00 — #1
I am attempting to add content with a scroll. I thought maybe I should make it a text box and remove the borders. I am seeing now this is not the way to go (being that the box is for input not content).
How would I achieve this: content that can scroll. I want two rows, 80 cols and the ability for the visitor to scroll the content.
xhtmlcoder — 2010-02-02T15:50:53-05:00 — #2
Basically you want to make a DIV scrollable and the simplest way is to give it dimensions and set the overflow. For example:
<div style="width: 8em; height: 2em; background-color: #ff0000; overflow: auto;">Det finns ingen som älskar smärta, som söker det och vill ha det, just för att det är smärta...</div>
You could also have set overflow value to 'scroll' instead of 'auto', which is probably what you wanted.
word_bird — 2010-02-02T16:38:06-05:00 — #3
I'm not Swedish but thanks I got it...
word_bird — 2010-02-02T18:04:26-05:00 — #4
Not getting how to manipulate this with CSS
word_bird — 2010-02-02T18:47:45-05:00 — #5
specifically how to move the box around the page...
ralphm — 2010-02-02T19:20:05-05:00 — #6
The best way is with floats, but you can use relative/absolute positioning (though it's usually not the best way).
We'd need to see your page to be able to advise on how to write the CSS.
word_bird — 2010-02-02T21:02:14-05:00 — #7
I'll try the float too but I just wrapped it in another div...Thanks
ralphm — 2010-02-02T22:41:28-05:00 — #8
Of itself, this will do nothing.
word_bird — 2010-02-03T00:23:23-05:00 — #9
works for me...don't know if it's 'wrong' or 'right'...but...
what is the 'correct' method for positioning the scroll div...
ralphm — 2010-02-03T00:54:47-05:00 — #10
That's like asking "where should I place my sofa?" To answer that, we'd need to know the layout of your room, what other furniture it contains, and what your need are.
Generally floating is the best method, but to detail how to do it we'd have to see your page.
word_bird — 2010-02-03T01:44:44-05:00 — #11
I was not asking where to place it...I was asking for the 'device' (code) etc IN ORDER TO move it so I can place it where I want...
ralphm — 2010-02-03T02:05:28-05:00 — #12
I know, but I mentioned earlier that you could use floats or relative/absolute positioning. That's a very general answer, though, and can't really be improved upon without knowing the circumstances of the div you want to position.
You said you had already floated it, so obviously this tip is not enough of a guide. Thus, I was trying to prompt you to give more information so that a more useful answer could be offered.
word_bird — 2010-02-03T02:29:58-05:00 — #13
xhtmlcoder — 2010-02-03T07:46:18-05:00 — #14
I'm not Swedish either but I wanted some "dummy text" to fill the DIV (to show the effect).
A certain tall guy with a big-beard and cat perched on his shoulder will be amused by that.