Page 1 of 1

how to set the size of frameset dynamically

Posted: Sat Apr 17, 2004 6:28 am
by davidklonski
Hello

I would like to display a frameset which divides the screen by columns. The page on the left is 'left.php' and the page on the right is 'right.php'.

The width of the left frame should be based on the width of 'left.php' (I don't want it to have a horizontal scrollbar and I cannot use a fixed width in the frameset because the page width may change based on its content).

Is there a way to set the cols attribute of frameset dynamically based on the width of the page (in pixels)?

If anyone know of a better solution for problem, I would appreciate it.

thanks in advance

Posted: Sat Apr 17, 2004 12:28 pm
by Pozor
Hello,

i would use a table design for that... much easyer.
when you want to limit the used space (e.g for right.php)
you can use this:

Code: Select all

<html><head><title>height</title>
</head><body bgcolor="FFFFFF" text="#000000">

<h1 style="height:100px; width:350px; overflow:auto; border:1px solid red; padding:10px; font-size:36pt">
this title is probably bigger as you can show it in this little tablewindow, and you can use css to prevent the destroying of your desing</h1>
<!-- overflow:hidden; is to hide content who is to big or scroll or auto-->
<!-- auto is better (only scrollbars, who are needed will be showed... -->
</body></html>
to include your files in the table design you can use include or include_once.


greez Pozor