473,785 Members | 2,235 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

align my aspx page in the middle

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
8 7459
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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.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
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****@microso ft.com> wrote in message
news:#V******** ******@TK2MSFTN GP15.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
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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.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
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******@hotma il.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.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
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******** ********@TK2MSF TNGP12.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******@hotma il.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.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
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******@hotma il.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.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
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******@hotma il.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******@hotma il.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****@microso ft.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.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
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****@microso ft.com> wrote in message
news:u5******** ******@tk2msftn gp13.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******** ********@TK2MSF TNGP12.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******@hotma il.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****@microso ft.com> wrote in message
> news:%2******** ********@TK2MSF TNGP15.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4460
by: Pino Carafa | last post by:
I've designed an aspx page with a Tab Strip on it. The problem is that unlike some of the simpler controls like text boxes and buttons and the likes, this Tab Strip is rendered something like this: <?XML:NAMESPACE PREFIX="TSNS" /><?IMPORT NAMESPACE="TSNS" IMPLEMENTATION="/webctrl_client/1_0/tabstrip.htc" /> <TSNS:TabStrip id="tbDocInfo" tabindex="2" class="DataEntry" onClick="tbDocInfo_Click();" selectedIndex="0"...
3
1497
by: thedebugger | last post by:
Dear Friends, I am working on website application in c# with asp.net. My practice using aspx files is, I have 1 main aspx files for inside pages. Whenever user hit the button like aboutus, contactus and similar buttons, also any other button from menu, it always call contentDisplay.aspx, including pageid and other ids depending upon contents. for example, aboutus button contain the url like contentDisplay.aspx?pageid=2 contactus button...
3
1118
by: notsure | last post by:
Hi, I have created a website in generic HTML with a frame in the middle of the page..My friend created a cool aspx page that has a few textboxes and stuff so that people can enter information. This information gets saved to a database that he created. He says that I can use his aspx page on my site.. We uploaded the entire .net web project into my folder my
5
12578
by: Raj | last post by:
Hi, I have a ASP.NET project which is working fine and I need to align controls in a .aspx page. The webform( .aspx page) has variety of controls (labels, textboxes, radio buttons etc) and when a user resizes the window, I would like these controls to center align in the page. Is there a way to do this using visual studio? I did some research and found a way using <table> <tr> <td> tags. But this is becoming cumbersome for me because...
4
2405
by: Rusty | last post by:
Hi, I've seen something on a web site that I want to do for our Intranet web site. I'm not advocating pop-ups but for our company app, this would be perfect. Please go to this page and hold your mouse over one of the rings. http://www.bluenile.com/product_catalog.asp?catid=8&oid1=364&track=hero& elem=img The middle ring on the top brings up this page, but in a pop-up form.
3
13672
by: Ollie Riches | last post by:
How do I embed a *.flv file (Flash Video) into an aspx page similar to embedding windows media player active x control? Cheers Ollie Riches
2
5596
by: cgdev1 | last post by:
Hi Folks, I'm somewhat a newbie to .Net (2.0) and even newer to Flash. I'm trying to incorporate a flash (.swf) file into my application. The code* below works in a .htm page (added to my project by using 'add new item' and pasting the code in it). However, the same code does not work in an .aspx page (the page does not throw any errors, but nothing happens aside from a border and a tool tip that says to click to activate). I also...
1
3461
by: epower | last post by:
Hello, I am working on an ASP .NET application in Visual Studio 2005 and running IE7. This application has a page that contains an iframe which loads an .aspx page and hyperlinks that load the iframe with different .aspx pages. The HTML/mark up for the .aspx pages executes every time, but the Page_Load events for the pages never run (on initial load or subsequent loads).
1
4777
by: aresung | last post by:
Developed a web application in ASP.Net (Framework 1.0), in which I have used public variable which is defined in the aspx page and in the code behind will have some calculations and the assign some value to that variable. Example: reports.aspx
0
9646
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
9484
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,...
0
9957
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
8983
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...
1
7505
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6742
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
5518
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2887
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.