pengi Posted October 20, 2013 Share Posted October 20, 2013 Hello everybody, I have created a table with fixed cell width and height for each cell. Now I would like to put some text, which end with a number into the cells. I assume the height is good enough for a paragraph of 2 lines only, but the number should always be aligned right at the bottom line. I have tried this CSS: .para { display:block; margin-left:0px; margin-right:0px;}.para span { display:block; margin-left:0px; margin-right:0px; float:right; text-align:right;} With this HTML: <td height='40'><p class="para">Here is the description. <span>135</span></p></td> It works ok, but if the words and the number only spans one single line, the number will be right-aligned at Line 1 instead. On the other hand, if I change float:right to float:bottom-right, when the words spans 2 lines, the number will be dropped to the right side of Line 3. Is there any way to solve the problem so that the number is always shown on Line 2 and right-aligned? Thanks! Pengi. Quote Link to comment https://forums.phpfreaks.com/topic/283116-right-align-the-last-words-in-a-paragraph-to-the-bottom-right-of-a-table-cell/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.