Web Design Forum  
 
Go Back   Web Design Forum > Web and Graphic Design > Web Design

Reply
 
LinkBack Thread Tools Display Modes
Old 08-09-2008, 09:58 PM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 1
Default No Centering!

Hey all,
I recently purchased some webspace and created a webpage with Microsoft Publisher. Nothing super specail but it made me a webpage that does the trick! When the page is loaded on any computer it doesnt center itself of the internet browser. rather it is stuck to the left side. I'm not 100% sure on how to fix this. I tried going into the html and putting <center> </center> right between <html> and <body> but that sure didnt work. Anyone know the trick?
MrNah is offline   Reply With Quote
Old 08-10-2008, 12:34 AM   #2 (permalink)
Moderator
 
jnjc's Avatar
 
Join Date: Jun 2008
Posts: 365
Default

Can you post the URL of your website.
jnjc is offline   Reply With Quote
Old 08-10-2008, 01:52 AM   #3 (permalink)
New Member
 
Streamline's Avatar
 
Join Date: Aug 2008
Posts: 1
Post Quick fix...

Simple problem to fix.

In your body css type in:
Code:
text-align: center;
Then your your wraping Div or table CSS put:
Code:
margin: 0 auto;
Streamline is offline   Reply With Quote
Old 08-10-2008, 05:29 AM   #4 (permalink)
Silver Member
 
adamblan's Avatar
 
Join Date: Aug 2008
Location: Lake Tahoe
Posts: 194
Default

To add to Streamline's solution:

If you define a width < 100% for the containing <div> and set it's side margins to auto, this will center the div.

Setting text alignment to center will center the content within that div.

So:

<div style="width:800px; margin:auto; text-align:center">
<p> Your centered content</p>
</div>
adamblan is offline   Reply With Quote
Old 08-11-2008, 05:57 PM   #5 (permalink)
joe
Bronze Member
 
Join Date: Aug 2008
Location: Dallas, Tx
Posts: 83
Default

Quote:
Originally Posted by MrNah View Post
Hey all,
I recently purchased some webspace and created a webpage with Microsoft Publisher. Nothing super specail but it made me a webpage that does the trick! When the page is loaded on any computer it doesnt center itself of the internet browser. rather it is stuck to the left side. I'm not 100% sure on how to fix this. I tried going into the html and putting <center> </center> right between <html> and <body> but that sure didnt work. Anyone know the trick?
I know it's not the official way to do things, but sometimes the easiest. The center tags should go after <body> tag. Might place <center> right after <body> and </center> right before </body>
joe is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 09:13 PM.


Computer Forum - TechZine - Webpage Design

 
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.