SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: css and frames

  1. #1
    SitePoint Addict ornette's Avatar
    Join Date
    Mar 2005
    Location
    Tenerife, Canary Isles
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    css and frames

    At the moment, on the site below, I am using frames
    http://www.ijacobs.com/pages/fotos/m...in_frames.html
    I have tried a couple of alternative css frames ideas, by Stu Nicholls and one suggested in a thread by Paul O'B without the success I am seeking.

    What I want is to be able to load an html page in the mainframe when the link is clicked in the sidebar, without having to load the sidebar again every time .......just as in the example page above.

    Is it possible? Is it reliable? Can anyone share with me their successful method?

    Thanks in anticipation.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,481
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    The answer is simple

    Just don't do it

    You can't load a page inside another page without using frames or an iframe or using javascript (although theoretically you can do it with the object element although it isn't that well supported yet).

    In effect you are creating a one page site that is bad for usability, accessibility and seo. Frames died a long time ago for all these reasons which is why no one uses them today.

    Although it may seem a good idea (and it seems its something that beginners always want to do for some strange reason) there is no benefit from doing this.

    If its just for a small amount of data then you can dynamically swap content in and out with a script but for a full site you want a whole page for each page. This means including the navigation on each page.

    You can of course use includes (ssi) to include common elements and allow you to change them sitewide qwuite easily.

    Once the first page has loaded and the CSS and images are cached then there is little delay in navigating to another page. This means that you have a proper site where all pages can be indexed.

    If you want an image gallery effect then as you aready know there are plenty of ways to popup an image (see lightbox) on the page but you don't really want to load html pages inside other html pages.

    What I want is to be able to load an html page in the mainframe when the link is clicked in the sidebar, without having to load the sidebar again every time .......just as in the example page above.
    Then that's what frames are there for and you should be using frames. However you should be aware of how bad frames are.

  3. #3
    SitePoint Addict ornette's Avatar
    Join Date
    Mar 2005
    Location
    Tenerife, Canary Isles
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the excellent information Paul. I've just had a look at Lightbox and it appears that I can style the output image with css to give it the appearance I want, which is what I don't like about many of the photo-album sites, they don't let you do that.

    I have been aware of how bad frames are for a while, but planning a major revamp of the site without them means I have to be sure of what I am doing before I change everything.

    Thanks again for your help.


Bookmarks

Posting Permissions

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