Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Paris, France
    Posts
    35
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question 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
    Regular Coder
    Join Date
    Jul 2002
    Location
    U.S. (Wish Japan though)
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •