Closed Thread Icon

Topic awaiting preservation: layers that stretch, scroll and are anchored Pages that link to <a href="https://ozoneasylum.com/backlink?for=8021" title="Pages that link to Topic awaiting preservation: layers that stretch, scroll and are anchored" rel="nofollow" >Topic awaiting preservation: layers that stretch, scroll and are anchored\

 
Author Thread
bluecorr
Nervous Wreck (II) Inmate

From:
Insane since: Jan 2002

posted posted 01-10-2002 06:50

I've never had to use layers before. They always seemed a bit unsafe as far as compatibility with other browsers is concerned. And I don't know too much Javascript either.

Basically what I need is a layer that will contain text and needs to scroll. It has to be able to stretch with the resolution but basically stay put (the left edge must be anchored).

Any idea how to achieve this with some clean code&css and make it compatible with netscape and opera?

Thanks

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 01-12-2002 11:17

This is what your code should look like:

code:
<html>
<head>
<style type="text/css">
<!--
.stretchscroll { position: absolute; top: 100px; left: 20%; height: 300px; width: 70%; overflow: auto; }
-->
</style>
</head>
<body>
<div class="stretchscroll">
<p>Your text goes here</p>
</div>
</body>
</html>


http://www.kussatz.com/asylum/stretchscroll.html

The top and left attributes make the layer appear 100px from the top and 20% of the browser window's width from the left. Since you want the layer "to stretch with the resolution" you can't say how many pixels the layer should take up, you just tell it to take up 70%. Overflow: auto; is for the scrollbars, they only appear when they are needed.

This scrollbar thing doesn't seem to work in Opera 5, but it's OK in IE 6 and NN 6 (and some older IEs, too, I guess)

Have fun!
Tilo



Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 01-12-2002 20:35

bluecorr: You might want to be a bit more specific about what you want. kuckus' script just gives you scrolling although they are right Op5 doesn't like overflow: auto. What it sounds like you want is a layer that is draggable and resizable and that requires much more DHTML magic (see the topic about dhtmlcentral.com's windows script as that may do what you want).

Emps

bluecorr
Nervous Wreck (II) Inmate

From:
Insane since: Jan 2002

posted posted 01-13-2002 08:44

actually I ended up using a iframe and worked fine. But I've got a problem in netscape 6.0, it makes the iframe look higher than it is. This is the line:

<iframe src="home_cnt.html" name="content" width="100%" height="344" scrolling="yes" frameborder="0" marginheight="0" marginwidth="0">[Your user agent does not support frames or is currently configured
not to display frames.]</iframe>

any reason why netscape sees it that way?


Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 01-13-2002 13:51

It's netscape, does it really need a reason?

bluecorr
Nervous Wreck (II) Inmate

From:
Insane since: Jan 2002

posted posted 01-14-2002 22:01

hehe good point but how do you fix it?!

« BackwardsOnwards »

Show Forum Drop Down Menu