473,791 Members | 2,933 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4182
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>UserControl 1</TD>
</TR>
<TR>
<TD>Body</TD>
</TR>
<TR>
<TD>UserControl 2</TD>
</TR>
</TABLE>
</form>

=============== =============== ==
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eE******** ******@tk2msftn gp13.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.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>UserControl 1</TD>
</TR>
<TR>
<TD>Body</TD>
</TR>
<TR>
<TD>UserControl 2</TD>
</TR>
</TABLE>
</form>

=============== =============== ==
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eE******** ******@tk2msftn gp13.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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>UserControl 1</TD>
</TR>
<TR>
<TD>Body</TD>
</TR>
<TR>
<TD>UserControl 2</TD>
</TR>
</TABLE>
</form>

=============== =============== ==
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eE******** ******@tk2msftn gp13.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.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>UserControl 1</TD>
</TR>
<TR>
<TD>Body</TD>
</TR>
<TR>
<TD>UserControl 2</TD>
</TR>
</TABLE>
</form>

=============== =============== ==
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eE******** ******@tk2msftn gp13.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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******@fitzm e.com> wrote in message
news:eS******** ******@TK2MSFTN GP15.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.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>UserControl 1</TD>
</TR>
<TR>
<TD>Body</TD>
</TR>
<TR>
<TD>UserControl 2</TD>
</TR>
</TABLE>
</form>

=============== =============== ==
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eE******** ******@tk2msftn gp13.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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******@fitzm e.com> wrote in message
news:eS******** ******@TK2MSFTN GP15.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.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>UserControl 1</TD>
</TR>
<TR>
<TD>Body</TD>
</TR>
<TR>
<TD>UserControl 2</TD>
</TR>
</TABLE>
</form>

=============== =============== ==
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:eE******** ******@tk2msftn gp13.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.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
5537
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? Thanks, - Olumide
22
2547
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
3734
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 HTML is this: <uc1:_Header id=_Header1 runat="server"></uc1:_Header></TD></TR> Any ideas?
1
326
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 .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
11
25392
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 Transitional): Attribute 'align' is considered outdated. A newer construct is recommended."
1
5950
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 module into my CMS. The calendar works fine except that if I click on the date or the month earlier or later, the page always goes back to the first page which is first opened. You can take a look at this address:...
1
8032
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: http://(address.of.my.webcam):port/LiveView.html and
4
1705
by: Aaron Gray | last post by:
Whats the replacement for align="center" on a div ? Many thanks in advance, Aaron
0
1139
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 ID="tbl1" runat="server" HorizontalAlign="center" CellPadding="0" CellSpacing="0"> ...plus the rest of the table. The tables center properly in the browser, but when I try to validate the site with the W3C validator at validator.w3.org I get: This...
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10154
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9993
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9029
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5430
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2913
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.