Position images into the corner of a div

Associate
Joined
20 Oct 2005
Posts
112
This seems absurd but I can't correctly position an image in the corner of a div that has a padding of 10px and get it to display correctly in all broswers.

What's the correct way to go about this?
 
Code:
<div style="position: relative;">
    <div style="position: absolute; bottom: 0; right: 0;">
        <img src="someimage.jpg" />
    </div>
</div>
Howzat?

You may need to add padding to the child div as well.
 
Ok, I misunderstood the relative/absolute positioning attribute (I was putting relative on the child) but it still doesn't totally solve it. FF and Chrome are correct but IE 7 has what looks like a 1px 'padding' on the bottom of the image where the BG colour shows through.
 
Back
Top Bottom