I have a div containing 2 paragraphs. I want the paragraphs to be aligned in the lower right corner of the div. I was able to align the params with text-align: right
, but I try my best to make the params align at the bottom of the div.
The markup is pretty simple:
<div> <p>content 1</p> <p>content 2</p> </div>
CSS
div{ border: 1px red solid; height: 100px; } p{ text-align: right; }
I tried using position:absolute
in the grams and the bottom: 0
setting, but this makes the paragraphs overlap with each other due to absolute positioning.
div does not cover the entire page, so the text of the paragraph should be laid out in a div.
Is there any way to achieve this effect so that the content "grows from below"?
The effect I want is similar to this (photoshop):
And the script above: http://jsfiddle.net/cbY6h/
source share