OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <html lang="en"> |
| 3 <style> |
| 4 tr td { |
| 5 position: relative; |
| 6 width: 100px; |
| 7 background-color: #dea; |
| 8 padding: 5px 0px 5px 0px; |
| 9 } |
| 10 |
| 11 tr td span { |
| 12 position: absolute; |
| 13 top: 7px; |
| 14 } |
| 15 |
| 16 tr td.dummy { background-color: #ead; } |
| 17 tr td.dummy span { position: static; } |
| 18 |
| 19 .left { text-align: left; } |
| 20 .right { text-align: right; } |
| 21 .center { text-align: center; } |
| 22 .start { text-align: start; } |
| 23 .end { text-align: end; } |
| 24 </style> |
| 25 </head> |
| 26 <body> |
| 27 <title>Test case for text-align for positioned text inside table cells</title> |
| 28 |
| 29 <p>Test case to check that absolutely positioned text inside table |
| 30 cells with 'relative' positioning are rendered inside the cells</p> |
| 31 |
| 32 <h1 style="font-size: 1em;">Checking different alignments for Left-To-Right text
:</h1> |
| 33 <table> |
| 34 <tr> |
| 35 <td class="dummy"><span>static text</span></td> |
| 36 <td class="left"><span>One</span></td> |
| 37 <td class="right"><span>Two</span></td> |
| 38 <td class="center"><span>Three</span></td> |
| 39 <td class="start"><span>Four</span></td> |
| 40 <td class="end"><span>Five</span></td> |
| 41 </tr> |
| 42 </table> |
| 43 |
| 44 <h1 style="font-size: 1em;">Checking different alignments for Right-To-Left text
:</h1> |
| 45 <table dir="rtl"> |
| 46 <tr> |
| 47 <td class="left"><span>One</span></td> |
| 48 <td class="right"><span>Two</span></td> |
| 49 <td class="center"><span>Three</span></td> |
| 50 <td class="start"><span>Four</span></td> |
| 51 <td class="end"><span>Five</span></td> |
| 52 <td class="dummy"><span>static text</span></td> |
| 53 </tr> |
| 54 </table> |
| 55 </body> |
| 56 </html> |
OLD | NEW |