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

align my aspx page in the middle

P: n/a
How do I allign all my content in aspx page in the middle of page like a lot
of websites ?

Dose it work with differnet screen resolutions?

Thanks for your help.
Nov 19 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Hi,

Put everything inside a <p> tag:

<body...>
<form....>
<p align="center">
*Put all of your HTML here.
</p>
</form>
</body>

Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
How do I allign all my content in aspx page in the middle of page like a lot of websites ?

Dose it work with differnet screen resolutions?

Thanks for your help.

Nov 19 '05 #2

P: n/a
There are a couple HTML ways of doing it.

1) Use the <center/> element.
2) Use tables and define the alignment as being centered.

There are probably others but this is really just an HTML issue.

"ALI-R" <ne****@microsoft.com> wrote in message
news:#V**************@TK2MSFTNGP15.phx.gbl...
How do I allign all my content in aspx page in the middle of page like a lot of websites ?

Dose it work with differnet screen resolutions?

Thanks for your help.

Nov 19 '05 #3

P: n/a
Hello Ken,

<p> stands for paragraph. Clearly you meant <div>, which is a section of
content.

--
Matt Berther
http://www.mattberther.com
Hi,

Put everything inside a <p> tag:

<body...>
<form....>
<p align="center">
*Put all of your HTML here.
</p>
</form>
</body>
Good luck! Ken.

"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
How do I allign all my content in aspx page in the middle of page
like a

lot
of websites ?

Dose it work with differnet screen resolutions?

Thanks for your help.

Nov 19 '05 #4

P: n/a
Hi Matt,

Nope, I mean paragraph. Set the alignment to center and everything inside
will be centered on the page. <div> will work too. <center> will make it
work. Alternatively you can set the "style" attribute of many parent
controls to center themselves on the page which will in turn center what is
inside. Then you can use the "align" attribute of the children controls to
organize them inside the parent. There a lot of ways to do this. The nice
thing about <p> is that you also have a "justify" option instead of just
left, center, and right align. Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Matt Berther" <mb******@hotmail.com> wrote in message
news:68***********************@news.microsoft.com. ..
Hello Ken,

<p> stands for paragraph. Clearly you meant <div>, which is a section of
content.

--
Matt Berther
http://www.mattberther.com
Hi,

Put everything inside a <p> tag:

<body...>
<form....>
<p align="center">
*Put all of your HTML here.
</p>
</form>
</body>
Good luck! Ken.

"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
How do I allign all my content in aspx page in the middle of page
like a

lot
of websites ?

Dose it work with differnet screen resolutions?

Thanks for your help.


Nov 19 '05 #5

P: n/a
What dose "justify" option dose ,I used justify along with "<P>" ,it dosn't
center the page,but with "Center",it is exactly what I want.
Thanks to all of you for helping.
ALi
"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Matt,

Nope, I mean paragraph. Set the alignment to center and everything inside
will be centered on the page. <div> will work too. <center> will make it
work. Alternatively you can set the "style" attribute of many parent
controls to center themselves on the page which will in turn center what is inside. Then you can use the "align" attribute of the children controls to organize them inside the parent. There a lot of ways to do this. The nice thing about <p> is that you also have a "justify" option instead of just
left, center, and right align. Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Matt Berther" <mb******@hotmail.com> wrote in message
news:68***********************@news.microsoft.com. ..
Hello Ken,

<p> stands for paragraph. Clearly you meant <div>, which is a section of
content.

--
Matt Berther
http://www.mattberther.com
Hi,

Put everything inside a <p> tag:

<body...>
<form....>
<p align="center">
*Put all of your HTML here.
</p>
</form>
</body>
Good luck! Ken.

"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
> How do I allign all my content in aspx page in the middle of page
> like a
>
lot

> of websites ?
>
> Dose it work with differnet screen resolutions?
>
> Thanks for your help.
>



Nov 19 '05 #6

P: n/a
Hello Ken,

My whole point was that the <p> tag is not the correct choice. <p> stands
for paragraph and as such should be used for paragraphs of text, not nested
forms or other things like that.

A container tag like <div> is the right choice for this. Although, for that
matter, you could use <body align='center'> too.

The reason why the other tags dont have a "justify" option is because its
hard to "justify" a form or an image...

--
Matt Berther
http://www.mattberther.com
Hi Matt,

Nope, I mean paragraph. Set the alignment to center and everything
inside will be centered on the page. <div> will work too. <center>
will make it work. Alternatively you can set the "style" attribute of
many parent controls to center themselves on the page which will in
turn center what is inside. Then you can use the "align" attribute of
the children controls to organize them inside the parent. There a lot
of ways to do this. The nice thing about <p> is that you also have a
"justify" option instead of just left, center, and right align. Ken.

"Matt Berther" <mb******@hotmail.com> wrote in message
news:68***********************@news.microsoft.com. ..
Hello Ken,

<p> stands for paragraph. Clearly you meant <div>, which is a section
of content.

--
Matt Berther
http://www.mattberther.com
Hi,

Put everything inside a <p> tag:

<body...>
<form....>
<p align="center">
*Put all of your HTML here.
</p>
</form>
</body>
Good luck! Ken.
"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
How do I allign all my content in aspx page in the middle of page
like a

lot

of websites ?

Dose it work with differnet screen resolutions?

Thanks for your help.

Nov 19 '05 #7

P: n/a
Hey Matt,

There are a ton of ways to do it. <p> will work just fine. Nobody has
talked about nested forms and in an ASP.Net newsgroup you'll never see them
recommended. Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Matt Berther" <mb******@hotmail.com> wrote in message
news:68***********************@news.microsoft.com. ..
Hello Ken,

My whole point was that the <p> tag is not the correct choice. <p> stands
for paragraph and as such should be used for paragraphs of text, not nested forms or other things like that.

A container tag like <div> is the right choice for this. Although, for that matter, you could use <body align='center'> too.

The reason why the other tags dont have a "justify" option is because its
hard to "justify" a form or an image...

--
Matt Berther
http://www.mattberther.com
Hi Matt,

Nope, I mean paragraph. Set the alignment to center and everything
inside will be centered on the page. <div> will work too. <center>
will make it work. Alternatively you can set the "style" attribute of
many parent controls to center themselves on the page which will in
turn center what is inside. Then you can use the "align" attribute of
the children controls to organize them inside the parent. There a lot
of ways to do this. The nice thing about <p> is that you also have a
"justify" option instead of just left, center, and right align. Ken.

"Matt Berther" <mb******@hotmail.com> wrote in message
news:68***********************@news.microsoft.com. ..
Hello Ken,

<p> stands for paragraph. Clearly you meant <div>, which is a section
of content.

--
Matt Berther
http://www.mattberther.com
Hi,

Put everything inside a <p> tag:

<body...>
<form....>
<p align="center">
*Put all of your HTML here.
</p>
</form>
</body>
Good luck! Ken.
"ALI-R" <ne****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
> How do I allign all my content in aspx page in the middle of page
> like a
>
lot

> of websites ?
>
> Dose it work with differnet screen resolutions?
>
> Thanks for your help.
>


Nov 19 '05 #8

P: n/a
Hi ALi,

When you use "justify" with text inside the <p> tags the text will stretch
itself so that it is both left and right aligned. Meaning that each line,
even though they don't contain the same amout of text will be sized to be
exactly the same width. Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"ALI-R" <ne****@microsoft.com> wrote in message
news:u5**************@tk2msftngp13.phx.gbl...
What dose "justify" option dose ,I used justify along with "<P>" ,it dosn't center the page,but with "Center",it is exactly what I want.
Thanks to all of you for helping.
ALi
"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Matt,

Nope, I mean paragraph. Set the alignment to center and everything inside will be centered on the page. <div> will work too. <center> will make it work. Alternatively you can set the "style" attribute of many parent
controls to center themselves on the page which will in turn center what

is
inside. Then you can use the "align" attribute of the children controls

to
organize them inside the parent. There a lot of ways to do this. The

nice
thing about <p> is that you also have a "justify" option instead of just
left, center, and right align. Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Matt Berther" <mb******@hotmail.com> wrote in message
news:68***********************@news.microsoft.com. ..
Hello Ken,

<p> stands for paragraph. Clearly you meant <div>, which is a section of content.

--
Matt Berther
http://www.mattberther.com

> Hi,
>
> Put everything inside a <p> tag:
>
> <body...>
> <form....>
> <p align="center">
> *Put all of your HTML here.
> </p>
> </form>
> </body>
> Good luck! Ken.
>
> "ALI-R" <ne****@microsoft.com> wrote in message
> news:%2****************@TK2MSFTNGP15.phx.gbl...
>> How do I allign all my content in aspx page in the middle of page
>> like a
>>
> lot
>
>> of websites ?
>>
>> Dose it work with differnet screen resolutions?
>>
>> Thanks for your help.
>>



Nov 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.