By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 1,951 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

align center not working in IE

P: n/a
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
Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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" <ts**********@ftsolutions.com> wrote in message
news:ei**************@TK2MSFTNGP15.phx.gbl...
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

Nov 19 '05 #2

P: n/a
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:O2**************@TK2MSFTNGP14.phx.gbl...
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.
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
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" <ts**********@ftsolutions.com> wrote in message
news:ei**************@TK2MSFTNGP15.phx.gbl...
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


Nov 19 '05 #3

P: n/a
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" <ts**********@ftsolutions.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:O2**************@TK2MSFTNGP14.phx.gbl...
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.
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

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" <ts**********@ftsolutions.com> wrote in message
news:ei**************@TK2MSFTNGP15.phx.gbl...
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



Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.