Quote:
Originally Posted by LadynRed
...align the text to the bottom. Another method would be to use a definition list.
|
How do I align the text to the bottom? Everything I have tried has resulted in the first line being where I want the last line of text to be (ie, equal with the bottom of the image), but any remaining text displays beneath the image.
I can absolutely position the text inside another div, which is relatively positioned and uses the image as a background. Eg:
<html>
<head>
<style type="text/css">
.AAA {
position: relative;
height: 253px;
background: url(image.jpg) top left
no-repeat;
}
.BBB {
position: absolute;
bottom: 0;
left: 205px;
}
</style>
</head>
<body>
<div class="AAA">
<div class="BBB">
<p>Line 1.</p>
<p>Line 2.</p>
<p>This line number 3.</p>
</div>
</div>
</body></html>
But this displays differently between browsers, (Firefox inserts a blank line under the text so that it's not really flush with the bottom of the image). So, then I need to change the absolute positioning of the text to bottom:-1em and have an alternate ie.css using bottom:0px.
There must be a better way to do this using some kind of vertical alignment? Like I said, it only seems to work for one line of text, but if you have 2 or 3 lines, the second and third line wind up below the image.
|