p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Javascript How-To (http://p2p.wrox.com/forumdisplay.php?f=87)
-   -   sizeable <div> (http://p2p.wrox.com/showthread.php?t=22314)

johnjohn December 8th, 2004 04:28 PM

sizeable <div>
Hi everybody,

I'm doing a webpage where I have to put a huge amount of data in a table.I want to always keep showing the top menu. So what I do is a "little scrollable windows" for the data. The problem is that I want the page to don't have a scrollbar but expand as much as I can my data windows with its own scrollbar.

So here is my code to make my scrollable windows for my data

<style type="text/css">
        height: 600px;
        width: 100%;
        overflow: auto;
        border: 1px solid #666;
        background-color: #ccc;
        padding: 1px;

But the problem is that I can't choose a percentage for the height so is there a way to retrieve the windows size and adjust the data windows from there??

Thank you very much

vinod_yadav1919 December 8th, 2004 08:28 PM

Hiii johnjohn,
yes you can get the window size
*** for IE*****
*** for NS*****


function AdjustScreen()
//if you want you can also manipulate obj.style.height
window.onresize = AdjustScreen
<div id="divid" style="overflow: auto; width: 168px; height: 420px;">
<table border=1 width=100%>

Well i haven't tested for NS
Hope this will help you

Cheers :)


All times are GMT -4. The time now is 11:42 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.