• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Help.

Orochi

Orochi - ShimaKage
  • 39
    Posts
    16
    Years
    i was thinking of a new layout for my site here and i thought of a sleek,mac design. i know how to do the dock using css,but i want the whole page to be a i-frame so i can do a link using the dock. can somebody help?
     

    aRedMoon

    Wait for me outside the lines
  • 11,127
    Posts
    20
    Years
    Why use an iFrame? Just use SSI or PHP, including content is much easier.
     
  • 10
    Posts
    16
    Years
    Using i-frames is as about as far away from being "sleek and macish" as possible. As koroku said, using SSL and PHP is much, much easier. And wanting to keep everything at one url is slightly annoying to the user of your website. If they want to get to content on your site they always must visit the home page first, and then navigate. They can never go directly to where they want to go.

    But assuming for some reason you can't use PHP and there is a valid reason that you want to always keep the url constant, here is the code:

    Code:
    <html>
    <body>
    <iframe 
    src ="URL_NAME.EXT" width=100% height=100% frameborder=0 marginwidth=0 marginheight=0>
    </iframe>
    </body>
    </html>
    That should do it for you. Just don't put anything outside of the iframe without changin the width and height of the iframe, otherwise you would end up with some ugly double scrolling going on. This is still kind of ugly-but it should work (try it, I've had no reason to actually do this before).
     

    aRedMoon

    Wait for me outside the lines
  • 11,127
    Posts
    20
    Years
    Uh woah dude, you should be putting quotes in there...
    HTML:
    <html>
    <body>
    <iframe 
    src="URL_NAME.EXT" width="100%" frameborder="0" marginwidth="0" marginheight="0">
    Sorry, your browser doesn't support frames. Get a decent one, why don't you?</iframe>
    </body>
    </html>
    Also, as I remember, height="100%" doesn't work with everything... mainly a lot of browsers.

    Then again, I haven't used iFrames in years so my memory may be bad.
     

    Geometric-sama

    The Manly Man of Steel
  • 11,440
    Posts
    20
    Years
    You can use Javascript to determine the width and height of the browser window and set the iFrame dimensions accordingly (see https://fl.ryux.net/ess/ for an example of dynamic heights), but that poses accessibility problems for those users without Javascript support. However, it should not be too much of an issue, as they will simply have a non-resizing frame.
     

    Orochi

    Orochi - ShimaKage
  • 39
    Posts
    16
    Years
    .

    I was thinking about a enter page where it says to enable your javascript or so,before entering my site where i can use nii-samas example of using the i-frame width and height accordingly. otherwise, they go to a page that has a 600x800 i-frame, i dunno what you think guys but..
     
    Back
    Top