Computing.Net > Forums > Web Development > centering the page

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

centering the page

Reply to Message Icon

Name: zasdfg
Date: March 16, 2006 at 10:55:03 Pacific
OS: wndowsxppppp
CPU/Ram: 500
Comment:

hello,

is there any html code we can incert on "head" or "body" to make the whole content of the page to be shown at the center , i´ve done a site and everythings fine, how i wanted,just , it´s all on the left of the page. can i change it with a simple code wihtout having to start again all ? thanks.



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: March 16, 2006 at 13:44:53 Pacific
Reply:

It depends on how you built the page on wether or not you can center it easily. You could put this into the head of your document, but the results may or may not be what you are looking for.

<style>
body {text-align:center;}
</style>

Michael J


0

Response Number 2
Name: zasdfg
Date: March 16, 2006 at 14:47:28 Pacific
Reply:

thanks, with that code, its leaves the left area, but goes too much too the right, ..its not on the center and it happen with other codes too that i found on google for this situation... too much too the eright..hmmmm..
, but thanks...


0

Response Number 3
Name: Michael J (by mjdamato)
Date: March 17, 2006 at 07:11:57 Pacific
Reply:

Then there might be a problem int he coding of the page. Try posing a link to your site so we can take a look. If all you need to do is create some space on the left side you could create a margin using this:

<style>
body {margin-left:20px;}
</style>

Just change the 20px to whatever value suits you.

Michael J


0

Response Number 4
Name: zasdfg
Date: March 17, 2006 at 08:21:31 Pacific
Reply:

i downloaded nvu , looks like a really good free editor, and interesting to someone not to much familiar with this stuff, ..i just moved all a little to the right in the design view, its not the same i wanted , but i think to do what i wanted i would have to start doing the page with auto stretch tables , not sure... i wanted the page to look in the center when the window is maximize , andwhen not mazimize in the left (with no margin) ... right now after moving stuff in Nvu editor , when maximize the page is in the center, but when not maximize theres a margin
in the left that i would like not to have it (but this must be the same margin that makes it in the center when maximize... )
a little to much confusion?? .. ehhe.. sorry, but theres no need to think about this anymore, the page is already fine how it is and for what it is.. thanks you.


0

Response Number 5
Name: zasdfg
Date: March 17, 2006 at 08:26:21 Pacific
Reply:

..ahhh...just solve this...im starting to love this Nvu editor :) ..., it was a div that it was being use as a container and that its position was absolute, i change it to relative and everything works good now.. don´t know why i just saw it with this editor..ut it ok now..thanks!!


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

Weblogic developer subscr... javascript: passing vars



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: centering the page

Centering the web page www.computing.net/answers/webdevel/centering-the-web-page/923.html

how do i change the page title? www.computing.net/answers/webdevel/how-do-i-change-the-page-title/2753.html

Webpage centering www.computing.net/answers/webdevel/webpage-centering/4225.html