Web Analytics Made Easy -
StatCounter Center A Frameset - CodingForum

Announcement

Collapse
No announcement yet.

Center A Frameset

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Center A Frameset

    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 ...


    Any idea ???


    Thanks in advance

    ::
    [color=dark blue]Freddy Bee[/color]

  • #2
    There are actually 2 ways to do this.... neither require Javascript.

    The first ways is simply use an iframe, in a table..
    Code:
    <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

    Code:
    <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

    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

    Comment


    • #3
      Why not make use of the full available window width and have your frameset adjust to it, or would that mess up your layout?
      Regards,
      Ronald.
      ronaldvanderwijden.com

      Comment

      Working...
      X