...

View Full Version : footer div and structure confusion.



turpentyne
02-13-2012, 07:16 AM
This is driving me nuts! My brain just can't seem to grasp how to get divs to align right and have the footer stay at the bottom.

The page I'm trying to figure out is here:
http://www.twigzy.com/test_workshop/subpage3.php

the white space with the small logo is supposed to be at the bottom, but something is putting extra space underneath with the green background from the"textbox1" div.

Co1dFusion
02-13-2012, 01:40 PM
Orgainse your divs like this
-One large div called conatiner
--Inside that a div called main
---Inside main your main content
--Outside main another div called footer

To get a div to align right use float:right;

SB65
02-13-2012, 02:02 PM
To get a div to align right use float:right;

I rather think the OP meant they wanted their divs to align correctly, not on the right.:rolleyes:

It's not so much the structure of your website in terms of divs that's the immediate issue here, but your use of absolute positioning, height and top values within your css. This is causing elements to appear in unexpected places and I don't think there's a very quick fix.

The problem with using absolute and top and left positions is precisely what you see here, in that many things need to be changed to add another element.

I'd be inclined to start again, create some divs called #header,#content and #footer, get your content within those divs, without any positioning at all, just let the document flow take care of itself. Then worry about the logo on the left and your social media buttons. I'd expect that redoing that will be quicker than trying to sort out all your current positioning and will certainly be easier to maintain going forward.

Your doctype needs to be right at the top, before all those conditional comments as well, otherwise IE will not play nicely....



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum