View Full Version : position relative questions

12-11-2010, 12:33 AM
trying to line up three divs in a row, which i accomplished using one absolute and two floats. now im trying to have another div below that, centered, which i have that part but the lower div floats up and overlaps the ones above it. I guess basically my question is as follows.

I know relative places the item relative to where it would normally show up in the html, but what properties or values or div types are considered "actual space" that pushes the item down.

Im also having this problem with my footer (lightly different setup) as it anchors off the div on the right, not the center one that is longer.

I have read several "tutorials" on this, and have yet to figure this out, so any advice/insight on this would be greatly appreciated.


12-11-2010, 01:03 AM
Hello mjbasford,
I think one ap element and two floats may not be the typical 3 column setup. Have a look at a simple method for 3 columns/boxes/divs/images ... whatever you want - http://nopeople.com/CSS%20tips/simple3column/index.html

Another example here - http://nopeople.com/CSS%20tips/3%20equal%20divs/index.html

It's possible your footer just needs clear: both; added to it's CSS to make it sit below everything.
Hard to tell without seeing your code though.

A link to the test site is always best but you can post your code here if there is no test site -
When posting code in the forum, please use the code tags, [code][/code] - available with the # button in the post edit window.
This will wrap your code in a scroll box which greatly helps the readability of your post.

12-11-2010, 04:46 AM
I typically start on this page for basic layouts as a time saver.


12-12-2010, 02:40 AM
For divs within a layout, it is exactly the same in getting them to line up, just make them smaller.