treehouse : what would you like to learn today?
Web Design Web Development iOS Development

fixed position on sidebar text without going to far down the footer

  • Hi CSS tricksters... :D Im needing some help with a website Im doing for the company Im working for here is the link Think Big Online

    as you can see on the right side i have a text saying "How Do you describe people as eclectic as ours? You don’t. You let them do it. ..." I want that text to scroll down but stop as soon as the footer appears...

    Ive tried using
    position:fixed;top:300px;margin-left:580px;
    but the text would then overlap the footer as soon as it appears... any way I could stop the text position and make it scroll just inside the content area?

    Can this be done by just CSS? or should I use jquery?
  • there is no css way to do that. You could give the footer a higher z index so the text goes behind the footer at least.
  • Well I don't think you can handle it without javascript unless you fix the footer, either.
    With pure css you can hide it behind the footer using z-index but
    there would be a moment where it's semi-behind semi-showing if that's acceptable go for it.
  • hi guys thanks for the response... since Id have to use js for that can you point me to the right direction? or maybe teach me how to make the effect... I dont want the text to go behind or disappear, i want it to stop just before the footer... can anyone help?
  • Hi John,
    This is a pretty handy jQuery plugin that I have used in the past. It should take care of what you need.

    http://www.wduffy.co.uk/jScroll/

    Hope that helps!
    -Paul