Click to See Complete Forum and Search --> : Div w/i a Div newbie


daprezjer
02-19-2009, 09:53 PM
So I'm taking the jump from Tables to Div layouts for non-record elements like I'm "supposed" to. Just for starters, I'm finding it much more complicated than tables would have ever been, and there are a number of cross-browser problems that would have never happened, but I won't get into a rant about it here.

So, instead, a simple question. I have some nested Divs I'm setting up like I would a nested table. But I'm finding that some DIVs are actually "poking out" of the original DIV. I didn't even know this was possible w/o some sort of positioning. Can anyone tell me what I'm doing wrong here: http://www.poweredpages.com/cityrecovery/index.php

I'm trying to keep that red bar inside the top DIV, which contains a gray background (and a red border to help you see where the outermost DIV lies).

Thanks,
Jeremy

Fang
02-20-2009, 04:32 AM
<div style="overflow:hidden; border: 1px solid red; padding: 5px; width: 950px; background-color: rgb(192, 192, 192); margin-left: auto; margin-right: auto; display: block; clear: both;">
http://www.quirksmode.org/css/clearing.html

Move the form tags to outside the table.
Validate your document: http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.poweredpages.com%2Fcityrecovery%2Findex.php

daprezjer
02-20-2009, 09:56 AM
Wow, thanks for that link. Again, all of this is way too complicated (at least compared to tables) and way too cross-browser problematic to make me want to switch from tables. I understand the pluses, but seriously, aren't the minuses just as bad?

Fang
02-20-2009, 10:48 AM
Most users use too much css. There can be problems, but once you grasp the basic concept and use of css, layouts become simple and the html clean.