Forum Moderators: open

Message Too Old, No Replies

How to make a scrolling text box

Can a scrolling text box (for page content) be made without JavaScript?

         

peterdouglas

9:26 pm on Nov 8, 2005 (gmt 0)

10+ Year Member



I've seen it done many times... a large amount of text put into a scrolling text box. Kind of like a text box in many web based emails where you keep typing your message and once it fills the text box, a vertical scroll bar appears so you can scroll up and down. Only this is for a brochure-type static website.

The reason I need I need it is because I'm using a really slick template, but it's not designed to expand vertically. On pages where there's a lot of typed content, I want to put it in a text box that scrolls vertically, so the template stays in tact.

I'm sure I've seen this done with some simple html, not with frames or JavaScript but cannot find any examples now. Anyone got an idea on this?

tata668

10:26 pm on Nov 8, 2005 (gmt 0)

10+ Year Member



You mean textarea [w3.org]?

peterdouglas

10:32 pm on Nov 8, 2005 (gmt 0)

10+ Year Member



No, not quite, but the same general idea. The users will not be entering any text, this is just for the content I am putting on the website. Say for example there are 10 paragraphs of text and I don't want the entire page to scroll down. Only the paragraph will scroll vertically, the rest of the page remains static. I'm sure I've seen this done without frames or JavaScript.

Captaffy

10:43 pm on Nov 8, 2005 (gmt 0)

10+ Year Member



You can create a textarea that can not be edited.

readonly='readonly'

peterdouglas

10:55 pm on Nov 8, 2005 (gmt 0)

10+ Year Member



Not quite sure what that means...

But it might be ok. I just want to have the paragraphs scroll vertically, it doesn't need to be edited. The visitors won't be able to enter anything. It's kind of like when you go to a website and they have the terms and conditions in a little box with a vertical scroll bar. Same idea, you see them all the time, only now that I want to look at one, I can't find one!

tata668

11:29 pm on Nov 8, 2005 (gmt 0)

10+ Year Member



Maybe this is what you're looking for:


<div style="overflow:auto;height:100px;">
long stuff
</div>

peterdouglas

12:26 am on Nov 9, 2005 (gmt 0)

10+ Year Member



Yes, that's excellent! I got it to work with CSS & xhtml 1.0 transitional. It doesn't seem to be working with tables (which is what the template is done on), so I'll have to play around with that.

Captaffy

12:38 am on Nov 9, 2005 (gmt 0)

10+ Year Member



It seems to me that you are describing a textarea that is set as readonly.

<textarea id="blah" readonly="readonly">Your text</textarea>

This way people can not actually change the text in the textarea. You then set the size of the textarea, and if there is enough text in it, there will be vertical scroll bars.

Tourz

12:44 am on Nov 9, 2005 (gmt 0)

10+ Year Member



google might be penalizing for this semi-hidden text now.

tedster

1:30 am on Nov 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you talking about textarea, or scrolling divs or both? At any rate, I haven't run into that possibility with either approach. In fact, it seems a bit unlikely to me -- but I also know that lots of things that happen with search engines seem unlikely.

Is there a thread in our Google Search forum that discusses this?

Tourz

5:54 am on Nov 18, 2005 (gmt 0)

10+ Year Member



No thread but someone mentioned somewhere that they were almost positive G wasn't reading content from things like

<div id="main" style="position:absolute; left:247px; top:225px; width:523px; height:321px; overflow: auto; visibility: visible;">

From our hammering by jagger, this may be true.

Anyways, after getting rid of the scrolling text box we are back up in the SERPs.

Dropping spammy external links may also have be a factor in getting back up.

Tourz

6:13 am on Nov 18, 2005 (gmt 0)

10+ Year Member



One thing to note though: while dropping our scrolling content box helped with G, it hurt us a bit in Y.

I am just going to make a design that incorporates all the content without the scroll bars.

Tourz

2:33 am on Nov 27, 2005 (gmt 0)

10+ Year Member



Update in case anyone is still reading:

Ignore everything I mentioned about the scrolling text box being penalized. To test this hypothesis, I restored ours a few days ago and so far there has been no penalty in the SERPs. The opposite really... and you can tell its been crawled b/c our new-old content is in the descriptions.

There ya go. I guess jagger penalties are about bad links and duplicate content. But I don't know anything... read further, add original content.

tedster

3:23 am on Nov 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



someone mentioned somewhere that they were almost positive G wasn't reading content from things like

<div id="main" style="position:absolute; left:247px; top:225px; width:523px; height:321px; overflow: auto; visibility: visible;">

Such positioning is widespread on the web, in the index and being ranked. There is nothing about this kind of mark-up that is problematic in my experience. However, in the interest of a cleaner html document, I would suggest putting all the inline "style=" rules and including them in the rules for #main (in an external stylesheet, I assume.)

energylevel

8:07 pm on Nov 27, 2005 (gmt 0)

10+ Year Member



You could use an iframe for the same effect...

Tourz

6:10 pm on Nov 28, 2005 (gmt 0)

10+ Year Member



someone mentioned somewhere that they were almost positive G wasn't reading content from things like

<div id="main" style="position:absolute; left:247px; top:225px; width:523px; height:321px; overflow: auto; visibility: visible;">

Such positioning is widespread on the web, in the index and being ranked. There is nothing about this kind of mark-up that is problematic in my experience. However, in the interest of a cleaner html document, I would suggest putting all the inline "style=" rules and including them in the rules for #main (in an external stylesheet, I assume.)

Yes, I am working on upgrading my style sheets to deal with more than just fonts... trying to lose the dreamweaver crutch.