text allign bottom right of div

The div had a set height, a background image, a width

Then it was

<div><p>lalala</p></div>

With this css you wrote about, and that just put it to the right, not the bottom-right
 
Positioning an element absolutely takes it out of the element stack/flow.
An absolutely positioned element will be positioned at the specified coordinates relative to its containing block.
You can define the containing block by giving a parent div a position of relative.

If you just want the paragraph to be in the bottom right of a div then use what I said above, and shown below :
picture1hbn.png

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="">
<head>
<meta http-equiv="content-type" content="text/html; charset=" />
<title></title>
</head>
<body>
<div style="border: 1px solid red; width: 800px; height: 500px; position: relative;">
<p style="border: 1px solid black; position: absolute; bottom: 0; right: 0; width: 300px;">
Donec non lectus. Nullam ut ante. Sed ut mauris. Proin tempus condimentum ante. Mauris risus felis, lacinia eleifend, consequat in, tincidunt vitae, magna. Donec ut felis. Curabitur dictum ante ut dui. Proin nunc augue, sagittis ac, consequat nec, ultrices volutpat, purus. In varius felis in dolor. Phasellus ipsum lectus, sollicitudin et, elementum id, congue sed, ligula.
</p>
</div>
</body>
</html>
 
Back
Top Bottom