PDA

View Full Version : div height has a mind of it's own


rezachemical
04-11-2006, 09:44 PM
hello,

relevant source: http://www.elitebeat.net/test/new/backendstyle.css
http://www.elitebeat.net/test/new/backend.html

i'm having some issues w/ a div element that seems to take it's height into it's own hands. altho defined as 97 px (refer to the source) it seems to take up a lot more room than that. You can tell when you open the html file up in dreamweaver and move ur mouse around to view the div's area.

the main reason this is a problem is because it is doing this of it's own accord (atleast to the best of my knowledge) and since i'm going to be developing this page for a while, a variable like this may come to be a big issue.

my question is can anyone see a reason why it is doing this? i need to have the div container labelled "dashboard" stick to the bottom of the "header" div but in such a way that the "header container stops it's height right after the image's bottom edge.

thank you in advance.

Kravvitz
04-12-2006, 04:46 AM
The top padding is doing that.

Read up on how the box model works:
Dodging the Box Model and other Oddities (http://www.tjkdesign.com/articles/boxmodel.asp)
Difference between box models, doctype switching, etc. (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp)
The Box Model Problem (http://www.communitymx.com/content/article.cfm?cid=E0989953B6F20B41)
Box model tweaking (http://www.quirksmode.org/css/box.html)
Interactive CSS Box Model Demo (http://www.redmelon.net/tstme/box_model/)