How do I center text in an ASP.Net Hyperlink?
<p>I have an ASP.Net <code>Hyperlink</code> with a set height. The text is rendered at the top left of it. How do I vertically center it (-the text)?</p>

<p>(In C# I'd have: <code>label1.TextAlign = ContentAlignment.MiddleCenter;</code> . How is it done in ASP.Net?)</p>

<p>Tried the following but it doesn't work (neither on FF nor on IE).</p>

<pre><code>&lt;form id="form1" runat="server"&gt;
&lt;div&gt;
&lt;asp:HyperLink NavigateUrl="~/WebForm1.aspx" runat="server" CssClass="MyClass" BackColor="White" 
Height="100px" Text="MyText"  Width="200px" &gt;&lt;/asp:HyperLink&gt;
&lt;/div&gt;
&lt;/form&gt;
</code></pre>

<p>And:</p>

<pre><code>.MyClass
{
    display: table-cell;
    text-align: center;
    vertical-align: middle;
}
</code></pre>
