#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2010
    Posts
    31
    Rep Power
    5

    How do i limit page height?


    I have a page with a 500px high image. I have another image that moves down it thats 1000px high. I only want the page to be 500px high, so that the 1000px image slides off and disappears leaving behind the 500px image. Ive tried setting style="max-height:500px;" in the body tag but that didnt do anything. Googling "limit page height" didnt help either. How is this done?
  2. #2
  3. Code Monkey V. 0.9
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2005
    Location
    A Land Down Under
    Posts
    2,136
    Rep Power
    1990
    I'm not quite sure of what you're trying to achieve, but I think that this might work.

    Wrap the images in a <div> tag, and apply a CSS rule to that div for "overflow: hidden;". Just set the width and height on the div and anything that doesn't fit inside that will not be shown.
    Code:
    <div style="width: 500px; height: 500px; overflow; hidden;"><img /></div>
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2010
    Posts
    31
    Rep Power
    5
    That did it, thanks.

IMN logo majestic logo threadwatch logo seochat tools logo