vAlign won't work

Discussion in 'ASP .Net' started by VB Programmer, Apr 11, 2005.

  1. I have a bunch of hyperlinks in a table cell and I set the valign to
    "middle", but they stay at the top. Any ideas? Here's the html...

    Thanks in advance!

    <TABLE id="Table1" cellSpacing="0" cellPadding="0" width="300" border="0">
    <TR>
    <TD><A href="http://www.zzz.com"><IMG height="23" alt=""
    src="images_generic/Copyright.png" width="166" border="0"></A></TD>
    <TD background="images_generic/NavBar.png" valign="middle">
    <P align="center">-
    <asp:HyperLink id="HyperLink1" runat="server"
    NavigateUrl="Default.aspx">Home</asp:HyperLink>
    &nbsp;-&nbsp;
    <asp:HyperLink id="Hyperlink2" runat="server"
    NavigateUrl="zzz.aspx">AAPEX</asp:HyperLink>
    &nbsp;-
    <asp:HyperLink id="Hyperlink3" runat="server"
    NavigateUrl="Links.aspx">Links</asp:HyperLink>
    -
    <asp:HyperLink id="Hyperlink4" runat="server"
    NavigateUrl="FAQ.aspx">FAQ</asp:HyperLink>
    -
    <asp:HyperLink id="Hyperlink5" runat="server"
    NavigateUrl="Membership.aspx">Membership</asp:HyperLink>
    &nbsp;-
    <asp:HyperLink id="Hyperlink6" runat="server"
    NavigateUrl="Contact.aspx">Contact</asp:HyperLink>
    &nbsp;-
    <asp:HyperLink id="Hyperlink7" runat="server"
    NavigateUrl="Press.aspx">Press Release</asp:HyperLink>
    &nbsp;-
    <asp:HyperLink id="Hyperlink8" runat="server"
    NavigateUrl="Login.aspx">Login</asp:HyperLink>&nbsp;-
    </P>
    </TD>
    </TR>
    <TR>
    <TD><IMG height="23" alt="" src="images_generic/BL2.png" width="166"></TD>
    <TD><A onmouseover="window.status='Affordable, Professional Website
    Design!'; return true;"
    onmouseout="window.status=''; return true;"
    href="http://www.aaa.com"><IMG height="23" alt=""
    src="images_generic/GTI.png" width="600" border="0"></A></TD>
    </TR>
    </TABLE>
    VB Programmer, Apr 11, 2005
    #1
    1. Advertising

  2. On Mon, 11 Apr 2005 11:19:32 -0500, VB Programmer <>
    wrote:

    > I have a bunch of hyperlinks in a table cell and I set the valign to
    > "middle", but they stay at the top. Any ideas? Here's the html...
    >
    > Thanks in advance!
    >
    > <TABLE id="Table1" cellSpacing="0" cellPadding="0" width="300"
    > border="0">
    > <TR>
    > <TD><A href="http://www.zzz.com"><IMG height="23" alt=""
    > src="images_generic/Copyright.png" width="166" border="0"></A></TD>
    > <TD background="images_generic/NavBar.png" valign="middle">
    > <P align="center">-
    > <asp:HyperLink id="HyperLink1" runat="server"
    > NavigateUrl="Default.aspx">Home</asp:HyperLink>
    > &nbsp;-&nbsp;
    > <asp:HyperLink id="Hyperlink2" runat="server"
    > NavigateUrl="zzz.aspx">AAPEX</asp:HyperLink>
    > &nbsp;-
    > <asp:HyperLink id="Hyperlink3" runat="server"
    > NavigateUrl="Links.aspx">Links</asp:HyperLink>
    > -
    > <asp:HyperLink id="Hyperlink4" runat="server"
    > NavigateUrl="FAQ.aspx">FAQ</asp:HyperLink>
    > -
    > <asp:HyperLink id="Hyperlink5" runat="server"
    > NavigateUrl="Membership.aspx">Membership</asp:HyperLink>
    > &nbsp;-
    > <asp:HyperLink id="Hyperlink6" runat="server"
    > NavigateUrl="Contact.aspx">Contact</asp:HyperLink>
    > &nbsp;-
    > <asp:HyperLink id="Hyperlink7" runat="server"
    > NavigateUrl="Press.aspx">Press Release</asp:HyperLink>
    > &nbsp;-
    > <asp:HyperLink id="Hyperlink8" runat="server"
    > NavigateUrl="Login.aspx">Login</asp:HyperLink>&nbsp;-
    > </P>
    > </TD>
    > </TR>
    > <TR>
    > <TD><IMG height="23" alt="" src="images_generic/BL2.png"
    > width="166"></TD>
    > <TD><A onmouseover="window.status='Affordable, Professional Website
    > Design!'; return true;"
    > onmouseout="window.status=''; return true;"
    > href="http://www.aaa.com"><IMG height="23" alt=""
    > src="images_generic/GTI.png" width="600" border="0"></A></TD>
    > </TR>
    > </TABLE>
    >
    >


    Hmmm, I just ran this and it seemed to work, although the first cell on
    that row is only 23 pixels high (the height of the image), so you can't
    tell that it is in the middle (the cell with the links is taller as the
    links are wrapping in the second cell as the table width is 300).

    If I added a bunch of <BR>s to the first cell and redisplayed, the links
    do show up in the middle vertically....

    What are you expecting to see?

    --
    Craig Deelsnyder
    Microsoft MVP - ASP/ASP.NET
    Craig Deelsnyder, Apr 11, 2005
    #2
    1. Advertising

  3. Doesn't look valigned on mine. Hmmmm
    "Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
    news:eek:...
    > On Mon, 11 Apr 2005 11:19:32 -0500, VB Programmer <>
    > wrote:
    >
    >> I have a bunch of hyperlinks in a table cell and I set the valign to
    >> "middle", but they stay at the top. Any ideas? Here's the html...
    >>
    >> Thanks in advance!
    >>
    >> <TABLE id="Table1" cellSpacing="0" cellPadding="0" width="300"
    >> border="0">
    >> <TR>
    >> <TD><A href="http://www.zzz.com"><IMG height="23" alt=""
    >> src="images_generic/Copyright.png" width="166" border="0"></A></TD>
    >> <TD background="images_generic/NavBar.png" valign="middle">
    >> <P align="center">-
    >> <asp:HyperLink id="HyperLink1" runat="server"
    >> NavigateUrl="Default.aspx">Home</asp:HyperLink>
    >> &nbsp;-&nbsp;
    >> <asp:HyperLink id="Hyperlink2" runat="server"
    >> NavigateUrl="zzz.aspx">AAPEX</asp:HyperLink>
    >> &nbsp;-
    >> <asp:HyperLink id="Hyperlink3" runat="server"
    >> NavigateUrl="Links.aspx">Links</asp:HyperLink>
    >> -
    >> <asp:HyperLink id="Hyperlink4" runat="server"
    >> NavigateUrl="FAQ.aspx">FAQ</asp:HyperLink>
    >> -
    >> <asp:HyperLink id="Hyperlink5" runat="server"
    >> NavigateUrl="Membership.aspx">Membership</asp:HyperLink>
    >> &nbsp;-
    >> <asp:HyperLink id="Hyperlink6" runat="server"
    >> NavigateUrl="Contact.aspx">Contact</asp:HyperLink>
    >> &nbsp;-
    >> <asp:HyperLink id="Hyperlink7" runat="server"
    >> NavigateUrl="Press.aspx">Press Release</asp:HyperLink>
    >> &nbsp;-
    >> <asp:HyperLink id="Hyperlink8" runat="server"
    >> NavigateUrl="Login.aspx">Login</asp:HyperLink>&nbsp;-
    >> </P>
    >> </TD>
    >> </TR>
    >> <TR>
    >> <TD><IMG height="23" alt="" src="images_generic/BL2.png"
    >> width="166"></TD>
    >> <TD><A onmouseover="window.status='Affordable, Professional Website
    >> Design!'; return true;"
    >> onmouseout="window.status=''; return true;"
    >> href="http://www.aaa.com"><IMG height="23" alt=""
    >> src="images_generic/GTI.png" width="600" border="0"></A></TD>
    >> </TR>
    >> </TABLE>
    >>
    >>

    >
    > Hmmm, I just ran this and it seemed to work, although the first cell on
    > that row is only 23 pixels high (the height of the image), so you can't
    > tell that it is in the middle (the cell with the links is taller as the
    > links are wrapping in the second cell as the table width is 300).
    >
    > If I added a bunch of <BR>s to the first cell and redisplayed, the links
    > do show up in the middle vertically....
    >
    > What are you expecting to see?
    >
    > --
    > Craig Deelsnyder
    > Microsoft MVP - ASP/ASP.NET
    VB Programmer, Apr 12, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QXJuZQ==?=

    valign=top doesn't always work

    =?Utf-8?B?QXJuZQ==?=, Dec 6, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    419
    =?Utf-8?B?QXJuZQ==?=
    Dec 6, 2004
  2. =?Utf-8?B?QXJuZQ==?=

    valign=top how does it work

    =?Utf-8?B?QXJuZQ==?=, Dec 6, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    421
    =?Utf-8?B?QXJuZQ==?=
    Dec 7, 2004
  3. =?Utf-8?B?QXJuZQ==?=

    Valign=top doesn't always work

    =?Utf-8?B?QXJuZQ==?=, Dec 6, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    588
    Dave Fancher
    Dec 7, 2004
  4. Chad
    Replies:
    4
    Views:
    8,323
  5. Reiner Wagner

    valign doesn't work

    Reiner Wagner, Mar 15, 2007, in forum: HTML
    Replies:
    4
    Views:
    4,824
    =?ISO-8859-1?Q?G=E9rard_Talbot?=
    Mar 17, 2007
Loading...

Share This Page