Simulating a frame structure with CSS

Discussion in 'CSS' started by Krakatoa, Mar 1, 2006.

  1. #1
    I'm trying to simulate the frame structure of my photo album ( http://www.krakatoa.it/kpa/ ) with CSS.
    I successfully made it with FireFox. You can see the result here: http://www.krakatoa.it/kpa2/ .
    The problem is with Internet Explorer.

    I tried to make an IE-only CSS. This is what I made so far: http://www.krakatoa.it/ot/ie.php
    But, as you can see, I can't fix the problem with the left menu.
    Can you help me?
    :(
     
    Krakatoa, Mar 1, 2006 IP
  2. Huvet

    Huvet Member

    Messages:
    16
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    38
    #2
    I've written a tutorial about that. You can find it at: friendlybit.com/css/frames-or-iframes-with-css/ (sorry, I can't paste live links yet :/ )
     
    Huvet, Mar 3, 2006 IP
  3. hooperman

    hooperman Well-Known Member

    Messages:
    646
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    108
    #3
    That's a nice looking site Huvet!
     
    hooperman, Mar 3, 2006 IP
  4. Krakatoa

    Krakatoa Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I don't understand how I can solve my problem... I mean, the layout I need is a little bit more complicated than those you talk about...
    :confused:
     
    Krakatoa, Mar 3, 2006 IP
  5. Tam

    Tam Peon

    Messages:
    89
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I had a quick tinker ...

    I put a #wrapper div around both your sidebar and content divs and rewrote your css as follows ...

    body { margin: 0; padding: 6em 0 6em 0; background: #fff; overflow: hidden; } 
    div#header, div#sidebar, div#footer { position:absolute; left: 0; } 
    #header { top: 0; z-index: 10; width: 100%; height: 6em; border-bottom: 1px solid #000; background: #aaa; overflow: hidden; padding: 1em; } 
    #sidebar { width: 12em; height: 100%; overflow-y: scroll; border-right: 1px solid #000; background: #ccc; padding: 1em; } 
    #wrapper { height: 100%; width: 100%; margin-bottom: 6em; }
    #content { width: 100%;	height: 100%; overflow-y: scroll; padding: 1em; margin-top: 6em; margin-left: 12em; } 
    #footer { bottom: 0; z-index: 10; width: 100%; height: 6em; border-top: 1px solid #000; background: #aaa; overflow: hidden; padding: 1em; } @media screen { body>#header, body>#sidebar, body>#footer { position:fixed !important; } } 
    
    Code (markup):
    It works in IE, but getting it to work cross browser would take me a bit longer, so you are on your own there, although I think you are planning on producing browser specific pages with browser detection scripting?

    Good luck with it :)
     
    Tam, Mar 4, 2006 IP
  6. Krakatoa

    Krakatoa Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It works! :D
    Now I'll apply it to my album! Thank you very much!!! :)
     
    Krakatoa, Mar 6, 2006 IP