Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

theprizefight

macrumors member
Original poster
Oct 29, 2006
91
0
On a design I am working on, I have some extra whitespace at the bottom of the page (maybe 200 pixels or so, which extends below my page background). The whitespace is due to using some relative positioning, and moving some DIV's above where the actually should be.

My question is, is there any type of CSS command, or HTML command, that will tell the browser to cut off the page a certain number of pixels before it actually ends?

Thanks in advance.
 

hobbbz

macrumors 6502a
Mar 8, 2005
605
4
Make that containing DIV's overflow:hidden and then give it a fixed height

Also, I would make that background always centered like the middle white box is and set it all on a blue background color instead of the white.
 

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,871
3
Alexandria, VA, USA
Wrap all content in a single div with an ID. Set its height and width to whatever you want in pixels in the associated CSS also add in the following:

overflow: hidden;

Notes:

A full explanation of overflow is found here.

As to positioning elements, anything outside the "flow" will display no matter what you do. If you position objects in this manner, then apply the height/width and overflow to the body tag in your CSS but -- I've never tried that so test it carefully. If all else fails, resort to creating an iframe and set the scrolling=no, but it's your last resort, a horrible way to do it. The best fix is NOT to position any elements outside the flow, keeps things very simple and the method I listed first works great.

-jim
 

Yvan256

macrumors 603
Jul 5, 2004
5,081
998
Canada
Haven't seen exactly what you mean, but remember that web pages are displayed in a lot of different browsers, on a lot of different operating systems, and (especially) a LOT of different screen resolutions.
 

Melrose

Suspended
Dec 12, 2007
7,806
399
If I understand your problem accurately, I've had the same problem before (well, once before). I forget how I resolved now, but I seem to remember it was something related to float and width of certain elements.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.