Help.

Orochi

Orochi - ShimaKage
  • 39
    Posts
    17
    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?
     
    Why use an iFrame? Just use SSI or PHP, including content is much easier.
     
    as i wanted the url to stay as "torrent-tatty.zxq.net" instead of "torrent-tatty.zxq.net/whatever.html"
     
    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).
     
    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.
     
    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.
     
    .

    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