...

View Full Version : Center A Frameset



freddybee
07-10-2002, 12:37 PM
Hello,

I do have a page composed of frameset.

That page is supposed to be used with a 800x600 screen

I would like that page (the frameset) to be centered in the screen when the resolution is higher ... :rolleyes:


Any idea ???


Thanks in advance

::

Cloudski
07-10-2002, 02:39 PM
There are actually 2 ways to do this.... neither require Javascript.

The first ways is simply use an iframe, in a table..


<table width="100% height="100%" border="0">
<TR>
<TD align="center" valign="center">
<iframe name="framename" src="framesrc" height="450" width="800"></iframe>
</TD>
</TR>
</table>


Or, you can simply make a LOT of frames around it, which can be messy.... and this WILL look bad.. lol



<FRAMESET border="0" framespacing="0" frameborder="0" rows="*,450,*" noresize>
<FRAMESET border="0" framespacing="0" frameborder="0" cols="*,800,*" noresize>
<FRAME name="LeftTopBlank" src="blank.html" marginwidth="0" marginheight="0" scrolling="no" noresize>
<FRAME name="TopBlank" src="blank.html" marginwidth="0" marginheight="0" scrolling="no" noresize>
<FRAME name="RightTopBlank" src="blank.html" marginwidth="0" marginheight="0" scrolling="no" noresize>
</frameset>
<FRAMESET border="0" framespacing="0" cols="*,800,*" frameborder="0" noresize>
<FRAME name="LeftBlank" src="blank.html" marginwidth="0" marginheight="0" scrolling="no" noresize>
<FRAME name="Main" src="main.html" marginwidth="0" marginheight="10" noresize> //This is your center...
<FRAME name="RightBlank" src="blank.html" marginwidth="0" marginheight="0" scrolling="no" noresize>
</frameset>
<FRAMESET border="0" framespacing="0" frameborder="0" cols="*,800,*" noresize>
<FRAME name="LeftBottomBlank" src="blank.html" marginwidth="0" marginheight="0" scrolling="no" noresize>
<FRAME name="BottomBlank" src="blank.html" marginwidth="0" marginheight="0" scrolling="no" noresize>
<FRAME name="RightBottomBlank" src="blank.html" marginwidth="0" marginheight="0" scrolling="no" noresize>
</frameset>
</frameset>


As ou can see... messy :D

It is your choice which to choose.. I would prefer the iframe...

Also note that height is at 450, that is for the browser bars and such.. (address bar and the such.. back buttons.. you get picture.. stuff up there...)

Hope this helps :D

ronaldb66
07-10-2002, 03:21 PM
Why not make use of the full available window width and have your frameset adjust to it, or would that mess up your layout?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum