473,385 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Align="Center" dosen't work in the Table on my asp.net page

Hi All,

I have two user controls (header and footer) ,,which I've placed in an HTML
Table in a page.I set the **align="center"** in the table and the table
still is on the left side of the page .How can I get the whole page(Table
and its user controls) aligned in the center of my page?

Thanks for your time in advance.
Ali
Nov 19 '05 #1
7 4148
Thanks for your quick reply,
here is the code
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute;
TOP: 12px" cellSpacing="1"
cellPadding="1" align="center" width="300" border="1">
<TR>
<TD>UserControl1</TD>
</TR>
<TR>
<TD>Body</TD>
</TR>
<TR>
<TD>UserControl2</TD>
</TR>
</TABLE>
</form>

================================
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eE**************@tk2msftngp13.phx.gbl...
Ali:
Can you provide more examples?

if I do
<table align="Center" border="1" width="50%">
<tr><td>1</td><td>2</td></tr>
</table>

the table appears in the middle in both IE and firefox.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi All,

I have two user controls (header and footer) ,,which I've placed in an

HTML
Table in a page.I set the **align="center"** in the table and the table
still is on the left side of the page .How can I get the whole page(Table and its user controls) aligned in the center of my page?

Thanks for your time in advance.
Ali


Nov 19 '05 #2
Ali,
It's probably the absolute positioning. Look at the style attribute,
it's set to put the table 8 pixels from the left margin. Setting the
alignment probably won't work as it should be over-ridden by the css
positioning. Try getting rid of the absolute positioning and see if that
helps. If you're using VS.Net, you may want to change from Grid Layout to
Flow Layout for the page. The positioning that the Grid Layout automatically
puts in can be a pain sometimes.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Thanks for your quick reply,
here is the code
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute;
TOP: 12px" cellSpacing="1"
cellPadding="1" align="center" width="300" border="1">
<TR>
<TD>UserControl1</TD>
</TR>
<TR>
<TD>Body</TD>
</TR>
<TR>
<TD>UserControl2</TD>
</TR>
</TABLE>
</form>

================================
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eE**************@tk2msftngp13.phx.gbl...
Ali:
Can you provide more examples?

if I do
<table align="Center" border="1" width="50%">
<tr><td>1</td><td>2</td></tr>
</table>

the table appears in the middle in both IE and firefox.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> Hi All,
>
> I have two user controls (header and footer) ,,which I've placed in an

HTML
> Table in a page.I set the **align="center"** in the table and the table
> still is on the left side of the page .How can I get the whole page(Table > and its user controls) aligned in the center of my page?
>
> Thanks for your time in advance.
> Ali
>
>



Nov 19 '05 #3
Ali:
Can you provide more examples?

if I do
<table align="Center" border="1" width="50%">
<tr><td>1</td><td>2</td></tr>
</table>

the table appears in the middle in both IE and firefox.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi All,

I have two user controls (header and footer) ,,which I've placed in an HTML Table in a page.I set the **align="center"** in the table and the table
still is on the left side of the page .How can I get the whole page(Table
and its user controls) aligned in the center of my page?

Thanks for your time in advance.
Ali

Nov 19 '05 #4
Thanks for your quick reply,
here is the code
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute;
TOP: 12px" cellSpacing="1"
cellPadding="1" align="center" width="300" border="1">
<TR>
<TD>UserControl1</TD>
</TR>
<TR>
<TD>Body</TD>
</TR>
<TR>
<TD>UserControl2</TD>
</TR>
</TABLE>
</form>

================================
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eE**************@tk2msftngp13.phx.gbl...
Ali:
Can you provide more examples?

if I do
<table align="Center" border="1" width="50%">
<tr><td>1</td><td>2</td></tr>
</table>

the table appears in the middle in both IE and firefox.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi All,

I have two user controls (header and footer) ,,which I've placed in an

HTML
Table in a page.I set the **align="center"** in the table and the table
still is on the left side of the page .How can I get the whole page(Table and its user controls) aligned in the center of my page?

Thanks for your time in advance.
Ali


Nov 19 '05 #5
Ali,
It's probably the absolute positioning. Look at the style attribute,
it's set to put the table 8 pixels from the left margin. Setting the
alignment probably won't work as it should be over-ridden by the css
positioning. Try getting rid of the absolute positioning and see if that
helps. If you're using VS.Net, you may want to change from Grid Layout to
Flow Layout for the page. The positioning that the Grid Layout automatically
puts in can be a pain sometimes.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Thanks for your quick reply,
here is the code
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute;
TOP: 12px" cellSpacing="1"
cellPadding="1" align="center" width="300" border="1">
<TR>
<TD>UserControl1</TD>
</TR>
<TR>
<TD>Body</TD>
</TR>
<TR>
<TD>UserControl2</TD>
</TR>
</TABLE>
</form>

================================
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eE**************@tk2msftngp13.phx.gbl...
Ali:
Can you provide more examples?

if I do
<table align="Center" border="1" width="50%">
<tr><td>1</td><td>2</td></tr>
</table>

the table appears in the middle in both IE and firefox.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> Hi All,
>
> I have two user controls (header and footer) ,,which I've placed in an

HTML
> Table in a page.I set the **align="center"** in the table and the table
> still is on the left side of the page .How can I get the whole page(Table > and its user controls) aligned in the center of my page?
>
> Thanks for your time in advance.
> Ali
>
>



Nov 19 '05 #6
Mark,
Thanks for yuor help.Now it's working:
The page's layout had been already set to **Flow Layout** so it didn't
help,but when I got rid of absolute positioning ,it worked and now the table
is in the center of the page.

Thanks Mark and Karl,
Ali
"Mark Fitzpatrick" <ma******@fitzme.com> wrote in message
news:eS**************@TK2MSFTNGP15.phx.gbl...
Ali,
It's probably the absolute positioning. Look at the style attribute, it's set to put the table 8 pixels from the left margin. Setting the
alignment probably won't work as it should be over-ridden by the css
positioning. Try getting rid of the absolute positioning and see if that
helps. If you're using VS.Net, you may want to change from Grid Layout to
Flow Layout for the page. The positioning that the Grid Layout automatically puts in can be a pain sometimes.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Thanks for your quick reply,
here is the code
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute;
TOP: 12px" cellSpacing="1"
cellPadding="1" align="center" width="300" border="1">
<TR>
<TD>UserControl1</TD>
</TR>
<TR>
<TD>Body</TD>
</TR>
<TR>
<TD>UserControl2</TD>
</TR>
</TABLE>
</form>

================================
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eE**************@tk2msftngp13.phx.gbl...
Ali:
Can you provide more examples?

if I do
<table align="Center" border="1" width="50%">
<tr><td>1</td><td>2</td></tr>
</table>

the table appears in the middle in both IE and firefox.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> Hi All,
>
> I have two user controls (header and footer) ,,which I've placed in an HTML
> Table in a page.I set the **align="center"** in the table and the table > still is on the left side of the page .How can I get the whole

page(Table
> and its user controls) aligned in the center of my page?
>
> Thanks for your time in advance.
> Ali
>
>



Nov 19 '05 #7
Mark,
Thanks for yuor help.Now it's working:
The page's layout had been already set to **Flow Layout** so it didn't
help,but when I got rid of absolute positioning ,it worked and now the table
is in the center of the page.

Thanks Mark and Karl,
Ali
"Mark Fitzpatrick" <ma******@fitzme.com> wrote in message
news:eS**************@TK2MSFTNGP15.phx.gbl...
Ali,
It's probably the absolute positioning. Look at the style attribute, it's set to put the table 8 pixels from the left margin. Setting the
alignment probably won't work as it should be over-ridden by the css
positioning. Try getting rid of the absolute positioning and see if that
helps. If you're using VS.Net, you may want to change from Grid Layout to
Flow Layout for the page. The positioning that the Grid Layout automatically puts in can be a pain sometimes.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Thanks for your quick reply,
here is the code
<form id="Form1" method="post" runat="server">
<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute;
TOP: 12px" cellSpacing="1"
cellPadding="1" align="center" width="300" border="1">
<TR>
<TD>UserControl1</TD>
</TR>
<TR>
<TD>Body</TD>
</TR>
<TR>
<TD>UserControl2</TD>
</TR>
</TABLE>
</form>

================================
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eE**************@tk2msftngp13.phx.gbl...
Ali:
Can you provide more examples?

if I do
<table align="Center" border="1" width="50%">
<tr><td>1</td><td>2</td></tr>
</table>

the table appears in the middle in both IE and firefox.

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> Hi All,
>
> I have two user controls (header and footer) ,,which I've placed in an HTML
> Table in a page.I set the **align="center"** in the table and the table > still is on the left side of the page .How can I get the whole

page(Table
> and its user controls) aligned in the center of my page?
>
> Thanks for your time in advance.
> Ali
>
>



Nov 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: 50295 | last post by:
Hi! I'm trying to set the align property/attribute of an IFrame to center but its not working (see below). Can anyone please tell me what's going on, and if there's a work around for this? ...
22
by: David. E. Goble | last post by:
Hi All; I have a few of these; sigsImages="sigs/finished1.jpg" sigsImages="sigs/foghorn.jpg" lower I have;
2
by: VB Programmer | last post by:
I created a simple user control and placed it on another page. Often I get this error: "Could not reformat the document due to line 27. The original format was restored." Line 27 in the...
1
by: ALI-R | last post by:
Hi All, I have two user controls (header and footer) ,,which I've placed in an HTML Table in a page.I set the **align="center"** in the table and the table still is on the left side of the page...
11
by: Ben Amada | last post by:
Hello, When centering a block of HTML, in the past, I've always used: <div align="center"> ... </div> However, in VS 2005, I get the following warning: "Validation (XHTML 1.0...
1
by: melda | last post by:
I am a real beginnner in ASP. Due to increasing demands on dynamic website, I've been working on ASP website now. I use a ready to use CMS program and right now I've been trying to combine a calendar...
1
by: Java Guy | last post by:
I'm trying to view a web page. IE tells me there are (Java?) errors on the page. Here they are: Line: 15 Char: 7 Error: Wrong number of arguments or invalid propert assignment Code: 0 URL:...
4
by: Aaron Gray | last post by:
Whats the replacement for align="center" on a div ? Many thanks in advance, Aaron
0
by: CptJack | last post by:
I've been banging my head on this one for a while now, so maybe someone else can figure out what's wrong here. I have several tables throughout my site which are defined using: <asp:Table...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.