Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: scrollable div

  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,464
    Thanks
    15
    Thanked 0 Times in 0 Posts

    scrollable div

    I have a div class=poem with a long poem in it. To the right of this div i want to have a div that scrolls along when you scroll down to read the whole poem (text to the left of it)

    how can I do this?

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,695
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    That would be position: fixed; applied to the side div. However, IE doesn't know this CSS rule. There are a lot of results when you search Google for "position: fixed IE", one of which is this. I hope that'll do it.

  • #3
    Senior Coder
    Join Date
    May 2004
    Posts
    1,464
    Thanks
    15
    Thanked 0 Times in 0 Posts
    but how do I make the div go to the rigght of the poem div and not under?
    would floating left of both help?

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,695
    Thanks
    6
    Thanked 1,011 Times in 984 Posts
    You need to combine position: fixed; with a top, right, left, and/or bottom value, then the element is taken out of the regular flow like it was positioned absolutely, it just stays fixed in the place where you put it.

    Example:
    Code:
    div#whatever {
      position: fixed;
      top: 20px;
      right: 20px;
    }


  •  

    Posting Permissions

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