Sunday, March 11, 2012

valign

The vertical align really only works on the content inside the element, it doesn't make the element switch places.

The best solution is to put them in the order you want them - this will also help to maintain the organisational structure of your pages, which benefits impaired users. Otherwise, you could fix the height on your element and use position: relative to move their display location.


You can use the HeaderTemplate and FooterTemplate of the TemplateColumn to accomplish this.


for the "This is up" text it works, but I am afraid that for the "This is bottom" won't works because the height is not fix, it can be higher or smaller.

what should I do next?


I have succedded:

<ItemStyle Height="100%" VerticalAlign="Bottom" />

<div style="position:relative; top:-70%;">This is up</div>

10x


Hi Tarjoadi,

I tried on my localhost and your code seems to works fine.

Have you checked that you don't have any global css defined on table, tr or td ?



sagol: in this code line

<asp:Literal runat="server" ID="ltlLiterak">...</asp:Literal>
.....have you entered some info linies instead "..." ?
P.S. I don't use any CSS 


sorry...but the supposed solution is not working:

<ItemStyle Height="100%" VerticalAlign="Bottom" />

<div style="position:relative; top:-70%;">This is up</div>

can you please help me with other ideas?


Hi, I have discovered what I was wrong.

Now I am using this code:

<table style="height: 90%; ">
<tr>
<td valign="top">
....
</td>
<td valign="bottom">

</td>
</tr>
</table>

Because I was using IE to see the output of this page and because IE's bugs I didn't realise that this is the correct code. Now, when I use FF everything is OK.

Do you know how can I do to work in IE too?

No comments:

Post a Comment