View Full Version : Scrollable content II with size in %

06-02-2009, 10:42 AM
1) Script Title:
Scrollable content II

2) Script URL (on DD):

3) Describe problem:
Hi. I'm a total newbie so maybe this question has an obvious answer but I've tried looking in the forum's archives and haven't found anything.
My problem is that I want to use "%" instead of "px" when defining the size of the scrollable content, and the script is not working properly.

I have tried changing this:

if (iens6){
document.write('<div id="container" style="position:relative;width:175px;height:160px;border:1px solid black;overflow:hidden">')
document.write('<div id="content" style="position:absolute;width:170px;left:0;top:0">')

<ilayer name="nscontainer" width=175 height=160 clip="0,0,175,160">
<layer name="nscontent" width=175 height=160 visibility=hidden>

To this:

if (iens6){
document.write('<div id="container" style="position:relative;width:100%;height:100%;border:1px solid black;overflow:hidden">')
document.write('<div id="content" style="position:absolute;width:90%;left:0;top:0">')

<ilayer name="nscontainer" width=100% height=100% clip="0,0,*,*">
<layer name="nscontent" width=100% height=100% visibility=hidden>

And when I do that it just stops showing the contents. I have looked at this script (http://home.comcast.net/~jscheuer1/side/index_side_table.htm) too but it's also set for values in pixels.

I would appreciate any help on this and if you need more information please let me know because it's my first post and I'm sure I'm not doing it ok.

Thanks :)