开发者

vertical align style for text

Hi there I'm working on an ASP.NET\ c# app;

I have a page with a div at the bottom just to show error\success messages to end user. These messages go into an asp label inside this div. I need those messages to be vertically aligned and so far i 开发者_开发百科had no success. Vertical- align doesn't seem to work with IE.

Any tip on that?

tks


What about using

line-height: /*parent height*/ 

On the parent element


Set display: table-cell and vertical-align: center in the css for the elements that hold the text.


You will need to create an html table inside your DIV. Then you can use the valign within the <td>.

If you need further illustration, you need to post your html so that we can help

Sample code:

<div>
    <table id="id1" cellspacing="0" cellpadding="0" width="100%" border="0">
    <tr>
          <td width="100%" valign="middle">Your message goes here....</td>
    </tr>
    </table>
</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜