browse: forums | FAQ
Connecting Tech Pros Worldwide

Hey there! Do you need ASP.NET help?

Get answers from our community of ASP.NET experts on BYTES! It's free.

align center not working in IE

tshad
Guest
 
Posts: n/a
#1: Nov 19 '05
I have the following:

<tr valign="baseline">
<td align="center" width="103" colspan=2 nowrap>
<asp:Button ID="ViewPositions" runat="server" Text="View Positions"
OnClick="ViewPositions_Click" />
<asp:LinkButton text="Advanced" onClick="Advanced_Click"
runat="server"/>
</td>
</tr>

In Mozilla, it works as I expected the button in the center with the
linkbutton next to it.

In IE, it puts the Button to the right with the LinkButton below it?????

Why is this?

Tom





Karl Seguin
Guest
 
Posts: n/a
#2: Nov 19 '05

re: align center not working in IE


Tom:
Not sure I fully understand what the problem is and what you want to get,
but try remove the space between the elements:

<asp:Button ID="ViewPositions" runat="server" Text="View Positions"
OnClick="ViewPositions_Click" /><asp:LinkButton text="Advanced"
onClick="Advanced_Click" runat="server"/>

might not show up well in the newsgroup..but just don't put the asp:button
and the asp:linkbutton on separate pages...actually glue them together (or
use a &nbsp;) if you want a space between them.

Karl


--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"tshad" <tscheiderich@ftsolutions.com> wrote in message
news:ei0WyqlKFHA.2936@TK2MSFTNGP15.phx.gbl...[color=blue]
> I have the following:
>
> <tr valign="baseline">
> <td align="center" width="103" colspan=2 nowrap>
> <asp:Button ID="ViewPositions" runat="server" Text="View Positions"
> OnClick="ViewPositions_Click" />
> <asp:LinkButton text="Advanced" onClick="Advanced_Click"
> runat="server"/>
> </td>
> </tr>
>
> In Mozilla, it works as I expected the button in the center with the
> linkbutton next to it.
>
> In IE, it puts the Button to the right with the LinkButton below it?????
>
> Why is this?
>
> Tom
>
>[/color]


tshad
Guest
 
Posts: n/a
#3: Nov 19 '05

re: align center not working in IE


"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:O2bLQ1lKFHA.2136@TK2MSFTNGP14.phx.gbl...[color=blue]
> Tom:
> Not sure I fully understand what the problem is and what you want to get,
> but try remove the space between the elements:
>
> <asp:Button ID="ViewPositions" runat="server" Text="View Positions"
> OnClick="ViewPositions_Click" /><asp:LinkButton text="Advanced"
> onClick="Advanced_Click" runat="server"/>
>
> might not show up well in the newsgroup..but just don't put the asp:button
> and the asp:linkbutton on separate pages...actually glue them together (or
> use a &nbsp;) if you want a space between them.[/color]

That doesn't seem to help.

Here is the viewsource from the page after it is rendered:

<tr valign="baseline">
<td align="center" width="103" colspan=2 nowrap>
<input type="submit" name="ViewPositions" value="View Positions"
id="ViewPositions" /><a
href="javascript:__doPostBack('_ctl0','')">Advance d</a>
</td>
</tr>

It shows that the cell should be aligned center and the linkbutton should be
next to the submit button (which it is in Mozilla) - but not in IE.

Tom[color=blue]
>
> Karl
>
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/ - New and Improved (yes, the popup is
> annoying)
> http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
> come!)
> "tshad" <tscheiderich@ftsolutions.com> wrote in message
> news:ei0WyqlKFHA.2936@TK2MSFTNGP15.phx.gbl...[color=green]
>> I have the following:
>>
>> <tr valign="baseline">
>> <td align="center" width="103" colspan=2 nowrap>
>> <asp:Button ID="ViewPositions" runat="server" Text="View
>> Positions"
>> OnClick="ViewPositions_Click" />
>> <asp:LinkButton text="Advanced" onClick="Advanced_Click"
>> runat="server"/>
>> </td>
>> </tr>
>>
>> In Mozilla, it works as I expected the button in the center with the
>> linkbutton next to it.
>>
>> In IE, it puts the Button to the right with the LinkButton below it?????
>>
>> Why is this?
>>
>> Tom
>>
>>[/color]
>
>[/color]


Karl Seguin
Guest
 
Posts: n/a
#4: Nov 19 '05

re: align center not working in IE


That's funny...it works for me in IE and not in Firefox :)

to get it working in firefox, I had to add:

style="white-space:nowrap;" in the TD else it would wrap to the next
line....

Might you be having a style having some effect on it? or perhaps another
table cell is the problem? What happens when you totally simplify it?

<table>
<tr valign="baseline">
<td align="center" width="103" nowrap="nowrap">
<input type="submit" name="ViewPositions" value="View Positions"
id="ViewPositions" /><a
href="javascript:__doPostBack('_ctl0','')">Advance d</a>
</td>
</tr>
</table>


Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"tshad" <tscheiderich@ftsolutions.com> wrote in message
news:%23AJD15lKFHA.3336@TK2MSFTNGP09.phx.gbl...[color=blue]
> "Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
> wrote in message news:O2bLQ1lKFHA.2136@TK2MSFTNGP14.phx.gbl...[color=green]
> > Tom:
> > Not sure I fully understand what the problem is and what you want to[/color][/color]
get,[color=blue][color=green]
> > but try remove the space between the elements:
> >
> > <asp:Button ID="ViewPositions" runat="server" Text="View Positions"
> > OnClick="ViewPositions_Click" /><asp:LinkButton text="Advanced"
> > onClick="Advanced_Click" runat="server"/>
> >
> > might not show up well in the newsgroup..but just don't put the[/color][/color]
asp:button[color=blue][color=green]
> > and the asp:linkbutton on separate pages...actually glue them together[/color][/color]
(or[color=blue][color=green]
> > use a &nbsp;) if you want a space between them.[/color]
>
> That doesn't seem to help.
>
> Here is the viewsource from the page after it is rendered:
>
> <tr valign="baseline">
> <td align="center" width="103" colspan=2 nowrap>
> <input type="submit" name="ViewPositions" value="View Positions"
> id="ViewPositions" /><a
> href="javascript:__doPostBack('_ctl0','')">Advance d</a>
> </td>
> </tr>
>
> It shows that the cell should be aligned center and the linkbutton should[/color]
be[color=blue]
> next to the submit button (which it is in Mozilla) - but not in IE.
>
> Tom[color=green]
> >
> > Karl
> >
> >
> > --
> > MY ASP.Net tutorials
> > http://www.openmymind.net/ - New and Improved (yes, the popup is
> > annoying)
> > http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
> > come!)
> > "tshad" <tscheiderich@ftsolutions.com> wrote in message
> > news:ei0WyqlKFHA.2936@TK2MSFTNGP15.phx.gbl...[color=darkred]
> >> I have the following:
> >>
> >> <tr valign="baseline">
> >> <td align="center" width="103" colspan=2 nowrap>
> >> <asp:Button ID="ViewPositions" runat="server" Text="View
> >> Positions"
> >> OnClick="ViewPositions_Click" />
> >> <asp:LinkButton text="Advanced" onClick="Advanced_Click"
> >> runat="server"/>
> >> </td>
> >> </tr>
> >>
> >> In Mozilla, it works as I expected the button in the center with the
> >> linkbutton next to it.
> >>
> >> In IE, it puts the Button to the right with the LinkButton below[/color][/color][/color]
it?????[color=blue][color=green][color=darkred]
> >>
> >> Why is this?
> >>
> >> Tom
> >>
> >>[/color]
> >
> >[/color]
>
>[/color]


Closed Thread