View Single Post
Old 08-10-2006, 12:41 PM   #5 (permalink)
aaron lozier
Inactive
 
Join Date: 08-09-06
Location: Lafayette, LA
Posts: 10
iTrader: 0 / 0%
aaron lozier is liked by many
img inside div

Here is how I would do it.

Suppose your HTML looked like this:

<div id="myDiv">
<img src="myImg.jpg />
</div>

Your CSS should look like this: (remove style tags if using stylesheet)

<style>
#myDiv
{
width: 804px;
height: 100px;
position: relative;
}

#myDiv img {
width: 500px;
height: 70px;
position: absolute;
bottom: 0px;
left: 152px;
}
</style>

By placing the "position: relative" definition in your div, the div becomes the reference point for child elements, such as your image. You may then "absolutely position" the image, 0 pixels from the bottom, and 152 pixels from the left.

Let me know if this helps.
aaron lozier is offline   Reply With Quote