I’m building a webpage which has an ‘img’ floated within a div as the lowest element displayed on page. The page ends abruptly at the bottom of the image. For nice aesthetics I would like the user to be able to scroll to just beyond the image (20px or so). I have attempted to apply margin-bottom and padding-bottom to both the body, a containing div, and the image in question but to no avail.
I have not, and will not try to do this using html to add a buffer or any other hackish solution.
The page: http://www.roughgiraffed.com/about.php
(please don’t judge us lol, still very rough (pun intended) and far from deployment)
Thank you in advance for any help!
Try adding
overflow: hidden;on#container. The floats are taking the.profiledivs out of the flow of the document, which makes the browser think#containeris only as high as the general text. Setting an overflow somehow resets this. When you’ve added it, you can set a margin on the container as you normally would.