Firefox2 compatibility - centering a table
-
Hi all, I am having browser compatiabiltiy problems. I want to center a table (or a Login Control). It works fine in IE(7), but not in FF(2). Here is an example where is will center align in IE, but left align in FF:
<div style="text-align:center;">
<asp:Login ID="login" runat="server" ... />
</asp:Login>
</div>The same thing will happen if I replace the Login with a Table Control. I have tried adding the property
align="center"
to the div (as suggested on other forums), but this tag is not recognised by VS 2005, so no joy. So how do i get such a control to center in FF? -
Hi all, I am having browser compatiabiltiy problems. I want to center a table (or a Login Control). It works fine in IE(7), but not in FF(2). Here is an example where is will center align in IE, but left align in FF:
<div style="text-align:center;">
<asp:Login ID="login" runat="server" ... />
</asp:Login>
</div>The same thing will happen if I replace the Login with a Table Control. I have tried adding the property
align="center"
to the div (as suggested on other forums), but this tag is not recognised by VS 2005, so no joy. So how do i get such a control to center in FF?Sometimes align="CENTER" is not picked up in VS 2005, just put it in and run the project and see if it works. Or try and change the target schema for validation. It should be sitting in your toolbar at the top of your screen if not right click and select HTML source editing. Hope this helps
-
Sometimes align="CENTER" is not picked up in VS 2005, just put it in and run the project and see if it works. Or try and change the target schema for validation. It should be sitting in your toolbar at the top of your screen if not right click and select HTML source editing. Hope this helps
As it turns out, I did not need the align="center". This is what I used:
....
I got this answer from http://forums.asp.net/t/1280636.aspx