Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make a div purposefully overflow by 32px?

I have a div that is styled height:100%. I would like the height to be 100% of the browser window, plus an additional 32px at the bottom, which will be cut off (along with its content). Is this possible? I searched, but it seems most people try to avoid this, not create it. A pure CSS solution would be preferable, but I'll try javascript or jquery if it's the only way.

Thanks in advance!

Clarification: There will be content within the div that I am trying to crop off, about 32px worth. So adding padding or any kind of blank space isn't quite what I'm looking for. Thanks.

like image 804
Scott Chandler Avatar asked Jul 01 '11 23:07

Scott Chandler


1 Answers

Just make a 100% height div the usual way, and add padding-bottom: 32px; to it.

For example: http://jsfiddle.net/zbp7U/

With some actual content: http://jsfiddle.net/zbp7U/1/

like image 78
thirtydot Avatar answered Oct 16 '22 22:10

thirtydot