Jump to content

Floating on the bottom?!


umbrella_thing

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 ???
Link to comment
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...
Link to comment
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.


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.