SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru tictike's Avatar
    Join Date
    Apr 2008
    Location
    Canada
    Posts
    863
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    change div height on page scroll

    I have a page with two divs positioned on the left and right side of page and they hold a background image. They are set to 100% height -- which is what I want. But when I scroll the page I need the divs to increase in height relative to how much scrolling occurred.

    How should I go about this?

    They are absolutely positioned now, should I try to add to the scrolled amount to the top property?

  2. #2
    SitePoint Guru tictike's Avatar
    Join Date
    Apr 2008
    Location
    Canada
    Posts
    863
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got it working now..

    Is this just a shorthand if..else.. statement?

    var _docWidth = (document.width !== undefined) ? document.width : document.body.offsetWidth;


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
  •