how to set the size of frameset dynamically

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
davidklonski
Forum Contributor
Posts: 128
Joined: Mon Mar 22, 2004 4:55 pm

how to set the size of frameset dynamically

Post 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
Pozor
Forum Commoner
Posts: 74
Joined: Tue Mar 30, 2004 11:11 pm
Location: Switzerland

Post 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
Post Reply