Web site help

Discussion in 'OT Technology' started by fatlip, Aug 5, 2003.

  1. fatlip

    fatlip Transcendence Into The Peripheral

    Joined:
    Jun 16, 2001
    Messages:
    522
    Likes Received:
    0
    Location:
    UK
    Hi guys. I’m trying to design a site using css and html; it’s going to consist of a box at the top containing the menu, a large content box in the center, and another box at the bottom. The problem is that I want the central box to scroll independently of the others, i.e. I want to be able to scroll through content in the middle box and have the top and bottom boxes stay where they are. I don’t know much about javascript but is there a script I could use to achieve this? Or some other method perhaps? Thanks in advance
     
  2. CompiledMonkey

    CompiledMonkey New Member

    Joined:
    Oct 26, 2001
    Messages:
    8,528
    Likes Received:
    0
    Location:
    Richmond, VA
    I know what you're talking about, but I'm not sure how people implement that.

    I just wanted to give my opinion and say that I don't think those designs look really good. If the content is large enough to make the user scroll, why not just let them scroll in their browser? I don't see any added benefit to restricting the size of your content table to force scrolling. :dunno:

    Of course this is just my opinion. :nuts:
     
  3. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    This is actually a fun CSS trick (which some might say isn't coding/scripting).

    The easiest thing to do is find a tutorial on how to use the overflow CSS attribute.

    You might try:

    http://hotwired.lycos.com/webmonkey/98/15/stuff4a/overflow.html
    (look for the bottom most example - I think this is what you are looking for)

    I don't believe I'm using it on any of my sites at this moment. You need to be carefull with this property because a majority of the browsers don't support it or support it incorrectly (IE v6 and Gecko-based browsers will be fine - you will want to test Opera, Safari/Konquerer, IE v5.x PC and Mac). Also plan for the content to not scroll because this is how Netscape v4.x browsers will handle it. In the end though, this usually ends up being a better solution then having to use frames...
     
  4. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    personally i do all my testing using moz 1.4

    i find that it works well.
     
  5. dmora

    dmora Guest

    check my website and steal the code. I stole it from Kenny :wavey:
    www.dmora.com
     
  6. fatlip

    fatlip Transcendence Into The Peripheral

    Joined:
    Jun 16, 2001
    Messages:
    522
    Likes Received:
    0
    Location:
    UK
    I wanted to avoid using frames, but it seems like the the best way to do this is to use them, until fixed positioning is properly supported anyway.

    Thanks for the replies guys :)
     
  7. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    What are you trying to do with fixed positioning? Are you trying to manually specify the x/y location of the box? All you need to do is drop some CSS on your TD tag that will contain the main content (the stuff you want to scroll). I'd recommend setting it to auto. You won't see scroll bars until the content exceeds the CSS height you specify.

    If you were to replicate this trick with frames, you'd need 5 frames to pull this off. If you're comfy with frames, it can be done (I've done it for a backend application that needed to be browser friendly). Although if IE v6 and Mozilla v1.x were around, I would have gone the CSS route since its very simple to implement and manage.
     
  8. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    Sadly, you are testing with blinders on. Mozilla is a great platform to test web site development, but you've got to run the site in other browsers to make sure you haven't injected "sucky-ness" without knowing it.
     
  9. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    yeah true. my page has some problems (mostly sizing) with ie... otherwise works ok.

    the w3c? code validator is good too!
     
  10. fatlip

    fatlip Transcendence Into The Peripheral

    Joined:
    Jun 16, 2001
    Messages:
    522
    Likes Received:
    0
    Location:
    UK
    Becuase fixed positioning would allow me to have the top and bottom boxes stay where they are whilst the middle box scrolls. It can be done easily with frames by having the whole page as one big frame, and then using an inline frame for the middle box, as I learned from dmora's site :bigthumb:
     
  11. Astro

    Astro Code Monkey

    Joined:
    Mar 18, 2000
    Messages:
    2,047
    Likes Received:
    0
    Location:
    Cleveland Ohio
    I'm taking a guess you may be using iframes (you mentioned inline frames which is what iframes are). By doing this, you've now only allowed IE and Gecko browsers to properly view your site. Just a heads up. Test test and test in other browsers - if thats a goal of your or not...
     

Share This Page