4 replies [Last post]
charlieconcepcion
Offline
Enthusiast
Last seen: 14 years 14 weeks ago
Joined: 2007-04-03
Posts: 102
Points: 0

Using floats... what is the best way to align a sibling div at the bottom of the parent div?

charlieconcepcion
Offline
Enthusiast
Last seen: 14 years 14 weeks ago
Joined: 2007-04-03
Posts: 102
Points: 0

Well lets say for

Well lets say for example:

Parent Div:
height: 500px;

sibling div:
height 100px;

I want to it to be valigned: bottom... though I dont want tables of course..

anyway to do this... align sibling div to the bottom inside parent div (500px height)?

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 49 weeks 3 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

Questions asked in a vacuum

Questions asked in a vacuum like this are almost impossible to answer. Generally I can say that using a DIV withing a DIV to display a footer is probably bad code practice but might not be. But you haven't told us why you want this particular effect or what problem it is meant to solve, so it's pretty hard to read your mind.

I can only just barely read my own mind...

Instead of setting up such a vague situation, though, why don't you explain why you want to do this? "How do I fix a footer to the bottom of the screen?" would be a productive question, but even better give a url and say "how do I make the footer appear at the bottom of the screen".

Or you might take a look around the forum since just such questions have been answered on numerous occasions.
For instance there's this message, which is on the first page of the "How To" forum topic listing.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.

charlieconcepcion
Offline
Enthusiast
Last seen: 14 years 14 weeks ago
Joined: 2007-04-03
Posts: 102
Points: 0

Thanks you read my mind.

Thanks you read my mind. Smile

Ed Seedhouse
Ed Seedhouse's picture
Offline
Guru
Victoria British Columbia
Last seen: 49 weeks 3 days ago
Victoria British Columbia
Timezone: GMT-8
Joined: 2005-12-14
Posts: 3570
Points: 675

charlieconcepcion

charlieconcepcion wrote:
Thanks you read my mind. Smile

Pure dumb luck. Now you've discovered the wealth of information in the "How to" section I hope you will start using this resource on a regular basis instead of just posting a vague question. You'll save both you and us time and we'll all get along better if you do.

Ed Seedhouse

Posting Guidelines

Watch out! I am carrying irony, sarcasm and satire, and know how to use them.