Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > vAlign won't work

Reply
Thread Tools

vAlign won't work

 
 
VB Programmer
Guest
Posts: n/a
 
      04-11-2005
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>


 
Reply With Quote
 
 
 
 
Craig Deelsnyder
Guest
Posts: n/a
 
      04-11-2005
On Mon, 11 Apr 2005 11:19:32 -0500, VB Programmer <(E-Mail Removed)>
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
 
Reply With Quote
 
 
 
 
VB Programmer
Guest
Posts: n/a
 
      04-12-2005
Doesn't look valigned on mine. Hmmmm
"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
news(E-Mail Removed) ...
> On Mon, 11 Apr 2005 11:19:32 -0500, VB Programmer <(E-Mail Removed)>
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
valign doesn't work Reiner Wagner HTML 4 03-17-2007 05:30 PM
valign=top how does it work =?Utf-8?B?QXJuZQ==?= ASP .Net 2 12-07-2004 12:33 PM
Valign=top doesn't always work =?Utf-8?B?QXJuZQ==?= ASP .Net 2 12-07-2004 01:44 AM
valign=top doesn't always work =?Utf-8?B?QXJuZQ==?= ASP .Net 2 12-06-2004 10:21 PM
valign in DataGrid Column Cezar ASP .Net 1 12-03-2003 10:08 PM



Advertisments