Reply
Scrolling Like TextArea
Old 05-31-2004, 05:21 PM Scrolling Like TextArea
Novice Talker

Posts: 9
Hey, I am trying to figure out how to do something. What I want to do is have an area in the middle of the page that you can scroll(kindof like haveing a middle frame), but I also want the background to be fixed. I kindof havean example here:

http://www.travisinasia.tk/

click 'ENTER' then 'Journals' .

In this example I am using a textarea , which works awesome, except that you cannot use images or any other HTML tags inside it. And for what I am doing that is kindof essential. If anyone has any suggestions at all, please post them.
PiperPAM27 is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 06-01-2004, 06:11 AM
Wenslock's Avatar
Webmaster Talker

Posts: 746
Location: Lincoln, UK
You could use an IFrame. That would fix the problem.
__________________
------------------------------------------------------------
www.blackprism.co.uk - Black Prism professional web design services
------------------------------------------------------------
Wenslock is offline
Reply With Quote
View Public Profile
 
Old 06-01-2004, 08:56 AM
karinne's Avatar
Extreme Talker

Posts: 197
Location: Quebec, Canada
or a scrolling div

Code:
<div style="overflow: auto">....</div>
http://www.w3.org/TR/CSS2/visufx.html#propdef-overflow

__________________
a web design portfolio - blog - last.fm - del.icio.us - widow's walk

Getting on the Web Standards band-wagon? Get these books - Designing With Web Standards and Web Standard Solutions

Takin' in the view from the outside. Feeling like the underdog. Watching through the window I'm on the outside. Living like the underdog.
-Dream Theater

Last edited by karinne : 06-01-2004 at 08:57 AM. Reason: link added
karinne is offline
Reply With Quote
View Public Profile Visit karinne's homepage!
 
Old 06-01-2004, 08:31 PM well...
Novice Talker

Posts: 9
Well, Iframes are not really very browser-compatible, so that is why I have not used them.

about the this DIV thing--I have not heard of this before. I went to the site you provided, but It did not have an example of this...just an explanation. Is there anywhere that I could look at an example?Well--not that I have not heard of div before--I use that expansively. I have just never heard of this 'overflow' thing.

Thanks.

Last edited by PiperPAM27 : 06-01-2004 at 08:39 PM.
PiperPAM27 is offline
Reply With Quote
View Public Profile
 
Old 06-02-2004, 08:31 AM
karinne's Avatar
Extreme Talker

Posts: 197
Location: Quebec, Canada
here... found this

http://www.adrenalyn.net/news/

in the top left corner... that's a scrolling div

Code:
div#updates { z-index:500; font-family:arial, helvetica, sans-serif; position:absolute; overflow:auto; width:160px; height:178px; left:32px; top:92px; }
__________________
a web design portfolio - blog - last.fm - del.icio.us - widow's walk

Getting on the Web Standards band-wagon? Get these books - Designing With Web Standards and Web Standard Solutions

Takin' in the view from the outside. Feeling like the underdog. Watching through the window I'm on the outside. Living like the underdog.
-Dream Theater
karinne is offline
Reply With Quote
View Public Profile Visit karinne's homepage!
 
Old 06-02-2004, 01:08 PM
Novice Talker

Posts: 9
OK--Sweet, I think Its working. Thankyou very much!

Last edited by PiperPAM27 : 06-02-2004 at 01:17 PM.
PiperPAM27 is offline
Reply With Quote
View Public Profile
 
Old 06-02-2004, 01:25 PM
karinne's Avatar
Extreme Talker

Posts: 197
Location: Quebec, Canada
no problem
__________________
a web design portfolio - blog - last.fm - del.icio.us - widow's walk

Getting on the Web Standards band-wagon? Get these books - Designing With Web Standards and Web Standard Solutions

Takin' in the view from the outside. Feeling like the underdog. Watching through the window I'm on the outside. Living like the underdog.
-Dream Theater
karinne is offline
Reply With Quote
View Public Profile Visit karinne's homepage!
 
Old 06-07-2004, 01:44 PM Another Problem
Novice Talker

Posts: 9
Hmmm, I have been Cross-browser testing, and It appears that I have another problem. In Netscape [6], When I use the div overflow thing, I get a white background instead of being transparent. As soon as I scroll it at all or anything, it becomes transparent so I can see what is behind it, but until then it stays white. If you have netscape, you can see an example at www.travisinasia.tk

>> then click 'enter' then 'journals' .

Thanks.
PiperPAM27 is offline
Reply With Quote
View Public Profile
 
Old 07-02-2004, 08:56 AM Use this code.
Mooofasa's Avatar
Defies a Status

Posts: 1,612
Name: Michael (mik) Land
Location: England
Copy the code to where you want it. (in the Body section) do not copy it into the tag itself though. If you want it to be larger then change all the instances of size.


<ilayer name="scroll1" width=170 height=150 clip="0,0,170,150">
<layer name="scroll2" width=170 height=150 bgColor="none">
<div id="scroll3" style="width:170px;height:150px;background-color: none;overflow:scroll">
<big>H</big>ello, this my script the scrollbar at the side works with IE4+, the up down are used for Netscape browsers(since NS does not support the adding of scrollbars to contents).
</div>
</layer>
</ilayer>

<script>

/***********************************************
* Scrollable content - Michael Land
***********************************************/

var nsstyle='display:""'
if (document.layers)
var scrolldoc=document.scroll1.document.scroll2
function up(){
if (!document.layers) return
if (scrolldoc.top<0)
scrolldoc.top+=10
temp2=setTimeout("up()",50)
}
function down(){
if (!document.layers) return
if (scrolldoc.top-150>=scrolldoc.document.height*-1)
scrolldoc.top-=10
temp=setTimeout("down()",50)
}

function clearup(){
if (window.temp2)
clearInterval(temp2)
}

function cleardown(){
if (window.temp)
clearInterval(temp)
}

</script>
<br><span style="display:none" style=&{nsstyle};><a href="#" onMousedown="up()"
onMouseup="clearup()" onClick="return false" onMouseout="clearup()">Up</a> | <a href="#"
onMousedown="down()" onMouseup="cleardown()" onClick="return false"
onMouseout="cleardown()">Down</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=0;return false">Top</a> | <a href="#" onClick="if (document.layers) scrolldoc.top=scrolldoc.document.height*(-1)+150;return false">Bottom</a></span>
Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Reply     « Reply to Scrolling Like TextArea
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.15415 seconds with 12 queries