Jump to content

Archived

This topic is now archived and is closed to further replies.

umbrella_thing

Floating on the bottom?!

Recommended Posts

Hi Guys
I have a website that has a div layer 600px wide, margin set to auto so it aligns in the center horozontally. What I want to anther div layer inside this "main" layer called "bottom" to sit, well, on the bottom.

So no matter how much stuff is on top its always at the bottom of the "main" div layer. Is this possible?

Thanks guys!

Umbrella ???

Share this post


Link to post
Share on other sites
Sure is, the best thing to do is create a layout structure similar to this:
[code]
<div id="container">
<div id="header">
Put header info in here
</div>
<div id="bodycontainer">
<div id="leftside">
left side
</div>
<div id="center">
center
</div>
<div id="rightside">
right side
</div>
</div>
<div id="footer">
test
</div>
</div>
[/code]

just copy and paste into dreamweaver or notepad and you'll see what it does.  Basically you use container div's to hold your left side, center etc...

Share this post


Link to post
Share on other sites
Hmmm.

That is indeed a simple layout order solution within the markup body tag, and if all divs are the same and one on top of the other, the footer will indeed be last.

But you are putting divs for left middle and right columns. 600px width is not enough room to work with for a container when creating a 2 or 3 column layout.

But if you just want a top, middle and bottom, no problem. But that still doesn't take into account paddings, borders, margins, floats, clears, box level componants, navigation, etc. within the divs.

What I mean is, it doesn't address the actual css for the div attributes. And if you try to have 2 columns float:left, and do not specify how the footer should handle that, you could end up with a 1200 wide container with a footer alongside the banner.

The key to footers is to make the width match the container and not let it wrap.
width:100%, clear:both works for most layouts.


Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.