name _F1
05-07-2007, 11:01 AM
I have a web application layout that consists of three basic panels:
_________________________
| | |
| | Panel B |
| Panel A | |
| | |
| | |
|-----------------------|
| Panel C |
| |
|_______________________|
I need Panel A to have fixed pixel dimensions, whilst Panels B and C fill the remaining space (no scrollbars). Currently this is achieved in the top two panels with a table row (yes, table layouts is bad, but it was (and is) the best solution as far as I know). The bottom row's height is set with a Javascript function that detects the available height, and then subtracts the height of Panel A. The function is executed onresize, also. (There is surely something wrong with CSS or my thinking if this is necessary for what I want.)
I want to have buttons in each panel that will swap it to the other side without a reload. For example, if the button in Panel C was clicked, C would move to the top, A and B would move to the bottom. If the button in Panel B was clicked, B would move to the left side, A would move to the right side, C would stay in its place.
This cannot be achieved with the current layout method, so I need to try and think of another method. One approach would be to use Javascript to determine the height and width of the screen, dynamically size Panels B & C, and absolutely position them. Changing their position would then only be a matter of changing their CSS positioning.
One of the panels contains an IFRAME which I would really prefer is not reloaded during the switch (it's quite vital to my application that it is not reloaded), therefore any methods that swap the innerHTMLs of two containers will not work.
What I want to know is what is the best method to achieve what I want? Is it absolutely positioning with Javascript-determined dimensions, or is there a better way?
_________________________
| | |
| | Panel B |
| Panel A | |
| | |
| | |
|-----------------------|
| Panel C |
| |
|_______________________|
I need Panel A to have fixed pixel dimensions, whilst Panels B and C fill the remaining space (no scrollbars). Currently this is achieved in the top two panels with a table row (yes, table layouts is bad, but it was (and is) the best solution as far as I know). The bottom row's height is set with a Javascript function that detects the available height, and then subtracts the height of Panel A. The function is executed onresize, also. (There is surely something wrong with CSS or my thinking if this is necessary for what I want.)
I want to have buttons in each panel that will swap it to the other side without a reload. For example, if the button in Panel C was clicked, C would move to the top, A and B would move to the bottom. If the button in Panel B was clicked, B would move to the left side, A would move to the right side, C would stay in its place.
This cannot be achieved with the current layout method, so I need to try and think of another method. One approach would be to use Javascript to determine the height and width of the screen, dynamically size Panels B & C, and absolutely position them. Changing their position would then only be a matter of changing their CSS positioning.
One of the panels contains an IFRAME which I would really prefer is not reloaded during the switch (it's quite vital to my application that it is not reloaded), therefore any methods that swap the innerHTMLs of two containers will not work.
What I want to know is what is the best method to achieve what I want? Is it absolutely positioning with Javascript-determined dimensions, or is there a better way?