- This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
Viewing 8 posts - 1 through 8 (of 8 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi,
I have the following HTML code, content for both the element with ID of “lPanel” and ID of “rPanel” are dynamically loaded. An issue is that content is the second TD or “rPanel” is not top aligned. How to fix it?
Thanks.
<Table vertical-align="top">
<TR>
<TD style="width:8%"></TD>
<TD width="40%"> <div id="lPanel" class="scrollable"></div> </TD>
<TD style="width:8%"></TD>
<TD width="44%" vertical-align="top"> <div id="rPanel" style="text-align:top"></div> </TD>
</TR>
</Table>
Instead of using a table for layout, use css columns… check out this article: https://css-tricks.com/almanac/properties/c/columns/
There is no vertical-align attribute – only a CSS property. Here is the correct syntax http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_td_valign_css
try this code.
http://codepen.io/anon/pen/JbVEMV
table td{
display:table-cell;
vertical-align:top;
}
I don’t think you’d need to specify what is already the default value…
@GMK Hussain, thank you.
I’m using a messy inherited CSS file for the app, which has changed lots of default I’m afraid.