aligning a nested div to the bottom of the parent div

C

Chris

Hi,
Is there an easy way to align a nested div to the bottom of the parent div?
Is there a solution for this without having to resort to the use of a lot
more div's and spacers?
Thanks,
 
J

jojo

Chris said:
Is there an easy way to align a nested div to the bottom of the parent div?

i guess the outer div has got a specified height? if it does not have
the inner div just has to be the last element in the outer one and it is
displayed at the bottom...
Is there a solution for this without having to resort to the use of a lot
more div's and spacers?

you mean <spacer>?? never ever use it!! it is an "IE only tag" and
should not be used!
 
B

Bergamot

Chris said:
Is there an easy way to align a nested div to the bottom of the parent div?

div.parent {
position: relative;
}
div.nested {
position: absolute;
bottom: 0;
}

Use with caution, and test in every browser you can find at a wide range
of window and text (zoom) sizes, because it is quite likely to break
somewhere.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top