CSS align image to the bottom of a variable height page

I have web template that requires an image to aligned to the bottom of the page, the issue i am having is depending on the content of the page the position of the image will need to move to remain aligned bottom.
----code---
#container { position:relative; width: 800px; margin:0px auto; padding: 0px; background-color:#030201; }

#main { width: 100%; padding-bottom: 10px; background-color:#ffce7b; }

<div id="container">

<div id="main">text, images, page content etc</div>

<div style="position:absolute; top:0px; left:0px; width:300px; height:100%; background:url(images/crown_logo.png) bottom no-repeat; z-index:400;"></div>

</div>
--------

This example will work fine if i put in a fixed height, but i really want the to be able to use the height:100% so the image is positioned relative to the container div

any help is greatly appreciated

Justin
LVL 1
fusioninternetAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

xberryCommented:
not sure what you want to achieve, have a look there please
http://www.dynamicdrive.com/style/layouts/category/C9/
is there is anything close to your purpose. Sorry.
0
fusioninternetAuthor Commented:
Thanks for the info, but i'm more after someone to see where i am going wrong in my code.

The issue is that i need an image to always be at the bottom of a containing div, the image i am using is a transparent png and overlays the content

The code causing the problem is:

<div style="position:absolute; top:0px; left:0px; width:300px; height:100%; background:url(images/crown_logo.png) bottom no-repeat; z-index:400;"></div>

If i change the attribute height:100% to a fixed pixel height (height:400px for example then the item aligns at the bottom of the 400px containing div, the issue is that the height changes on every page due to the content of the page changing the depth of the page.

If i use the attribute height:100% then the browser just renders a small div that is a few pixels deep, not to the height of the parent div.

Regards

Justin
0
xberryCommented:
Actually the problem is only in Internet Explorer, but to solve very simple:

in this div:
<div style="position:absolute; bottom:0px; left:0px; width:300px; height:100%; background:url(images/crown_logo.png) bottom no-repeat; z-index:400;"></div>

you see what I did ?

instead of top, call it bottom:0px;

try, I don't have your img-file herre, but with a dummy I used,
it actually worked here at my place.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.