Wednesday 15 May 2013

html - How to vertically top align div inside of div? -



html - How to vertically top align div inside of div? -

i trying top align div within of div , i'm having no success. http://jsfiddle.net/jhbs31xv/

<table style="border: 1px solid red; width: 100%"> <tr> <td> <div style="display: table-cell; width: 200px; height: 500px; overflow-y: auto;"> <div id="housingtree" class="demo" style="height: 100px;"> </div> </div> </td> <td style="width: 100%; height: 100%; border: 1px solid blue;"> <div style="height: 100%; width: 100%;"> <div id="infopane" style="width:100%;margin-left:10px; border: 1px solid green;vertical-align:top; "> how top align me? </div> </div> </td> </tr> </table>

like this:

<td style="width: 100%; height: 100%; border: 1px solid blue;" valign="top"> <div style="height: 100%; width: 100%;"> <div id="infopane" style="width:100%;margin-left:10px; border: 1px solid green; "> how top align me? </div> </div> </td>

add valign="top" containing .

and, goos van den bekerom mentions, shouldn't have div in td....

html css

No comments:

Post a Comment