Forum Moderators: not2easy

Message Too Old, No Replies

Making an image align vertically bottom in resizeable div

parent div is 100% height - I want child div to align bottom

         

PublicSphere

10:09 am on Aug 18, 2005 (gmt 0)

10+ Year Member



I have a div that is a background image. I'd like it to align to the bottom of the parent div, which is height 100%, so it resizes. I've seen some examples on the web of absolute positioning but my parent div is aligned center and is 100% height so I can't use absolute positioning as far as i know.

Any suggestions?

benihana

10:26 am on Aug 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a div that is a background image

this is a little a confusing .

Could you use something like this:

#parentdiv {
background:url(../myimage.gif) no-repeat center bottom;
}

where the main div has an id of parentdiv.

to apply the background directly to the parent div, and not worry about absolute positioning at all?

PublicSphere

10:28 am on Aug 18, 2005 (gmt 0)

10+ Year Member



Yes I could - clearly I'm an idiot. lol

Thanks - obviously havn't got my head screwed on today.