SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    Back in Action Winged Spider's Avatar
    Join Date
    Jun 2001
    Location
    outside my mind
    Posts
    900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS used to mimic frames?

    I still have some sites that another company and I are working on that use frames. But I convinced them that the effect could be mimiced with CSS.

    Here's the code that I've got so far.

    Code:
    .framething {
    position: absolute;
    top: 0px;
    left: 0px;
    border: 1px solid #000;
    }
    Am I on the right track?


  2. #2
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Methinks position:fixed is what your after.

    "Fixed boxes do not move when the page is scrolled" (from the w3c spec). The effect would be similar to using a top frame for the page header.

    Unfortunately its not supported in IE 5.5 not sure bout IE 6 though.

    HTH

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2001
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    frames and css

    Originally posted by isotope235
    Methinks position:fixed is what your after.

    until ie supports position:fixed we wont be able to do this:

    http://www.w3.org/TR/REC-CSS2/visure...ed-positioning

    there have been a lot of attempts and discussion on how to do it. do a google group search for "frame layout css".

    stevo

  4. #4
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by isotope235

    Unfortunately its not supported in IE 5.5 not sure bout IE 6 though.

    Is there an echo in here?

  5. #5
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll need t use the overflow property to get scroll bars. Also, I wouldn't go with positioning of any kind for this; I think it's needless in this case and a bit cumbersome.[diagram]Browser Window:
    -------------------------------
    | #topFrame { overflow: auto; |
    | height: 20%; width; 100% } |
    |-------------------------------|
    | #sideBar { | #contentArea { |
    | overflow: | overflow: auto;|
    | auto; | height: 70%; |
    | height: 70%;| width: 60%; } |
    | width: 40%;}| |
    | | |
    |-------------------------------|
    | #bottemFrame { overflow: auto;|
    | height: 10%; width: 100% } |
    -------------------------------[/diagram]This is just experimental, but there's my idea. I haven't tested it though so I don't know how well it would work. You can either use <DIV>s and whatever or even [gasp] <TABLE>s to do it. You'll probably have to resort to using non-standard (or at least found open) methods to do it, but between frames and non-standard code, I lean towards the latter.

    ~~Hope This Helps


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
  •