Hi, Unregistered. | Today's Posts

T-Shirt Forums
User Name
Password

Need to Register?

Forgot Your Password?


Site Navigation







+   T-Shirt Forums > T-Shirt Selling > Ecommerce Site Design
Discuss website design for ecommerce sites, useability, navigation and other development considerations. To get feedback on your t-shirt design(s) or website, please post a request in our Site Reviews and Design Reviews section here.

How to center a website



 
Share This Thread Thread Tools Search this Thread
Old October 18th, 2006 Oct 18, 2006 11:59:19 PM -   #1 (permalink)
T-Shirt Lover
T-Shirt Fan

psonio's Avatar
 
Member Since: Oct 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Question How to center a website

Hello good people,

I wish i had come across these forums way before i started my site.
I have a site going at psonio.gr with spreadshirt.

I am using Dreamweaver 8 and i am trying to figure out how to make the whole site center, no matter the user's resolution.
Can someone help?

Thanks in advance.

Last edited by Solmu; October 19th, 2006 at 05:26 AM. Reason: de-linked url
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 19th, 2006 Oct 19, 2006 2:06:28 AM -   #2 (permalink)
T-Shirt Lover
T-Shirt Ninja

zhenjie's Avatar
 
Member Since: Aug 2006
Location: Mong Kok, HK - Melbourne, AUS
Posts: 929
Thanks: 27
Thanked 88 Times in 75 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

looks like you centred it already?
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 19th, 2006 Oct 19, 2006 5:44:49 AM -   #3 (permalink)
T-Shirt Lover
T-Shirt Master

punkapalooza's Avatar
 
You can call me: Brock
Member Since: Oct 2006
Posts: 318
Thanks: 0
Thanked 0 Times in 0 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

Quote:
Originally Posted by psonio
Hello good people,

I wish i had come across these forums way before i started my site.
I have a site going at psonio.gr with spreadshirt.

I am using Dreamweaver 8 and i am trying to figure out how to make the whole site center, no matter the user's resolution.
Can someone help?

Thanks in advance.
looks pretty bang on centered to me. i have a question, how much do u need to know to do that in dreamweaver? i have no html knowledge watsoever.
__________________
http://www.murderchristy.com
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 19th, 2006 Oct 19, 2006 7:10:08 AM -   #4 (permalink)
T-Shirt Lover
T-Shirt Fan

DirtyJerseys's Avatar
 
You can call me: Dirty
Member Since: Oct 2006
Location: Morristown, NJ
Posts: 49
Thanks: 0
Thanked 1 Time in 1 Post
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

It looks centered when you open the page first, but I think what psonio wants is that if one was to grab the browser's edge and adjust the size, the site design would stay centered in the browser. This is not the case. I am not sure how to do this. I use Net Object Fusion for web design. Is there anyone with the talent with Dreamweaver out there that can help with this?
__________________
Dirty Jerseys "making US a little bit dirtier" www.DirtyJerseys.com
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 19th, 2006 Oct 19, 2006 8:44:01 AM -   #5 (permalink)
T-Shirt Lover
T-Shirt Fan
Thread Starter

psonio's Avatar
 
Member Since: Oct 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

Quote:
Originally Posted by psonio
Hello good people,

I wish i had come across these forums way before i started my site.
I have a site going at psonio.gr with spreadshirt.

I am using Dreamweaver 8 and i am trying to figure out how to make the whole site center, no matter the user's resolution.
Can someone help?

Thanks in advance.
Yes, it appears centered, because I have used a table cell object on the left. But if you resize or use a different resolution, it will not be centered. I need something that will center relative to the browser window. I am assuming it might have to do with the page properties.

As for the skills needed to do this in Dreamweaver, it's not that hard, but it takes some getting used to the software. I tried to use GoLive as well, and found it much more difficult. Frontpage just sucks.
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 19th, 2006 Oct 19, 2006 9:15:53 AM -   #6 (permalink)
T-Shirt Lover
T-Shirt Fan

VariantArt's Avatar
 
Member Since: Sep 2006
Posts: 39
Thanks: 0
Thanked 9 Times in 1 Post
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

Perhaps you can try using CSS and utilize a wrapper Div tag to contain your content.


#Wrapper{
margin-right: auto;
margin-left: auto;
padding-right: 0px;
padding-left: 0px;
text-align: left;
position: relative;
width: 800px;
}

<DIV id="Wrapper">
- Your content goes here -
</DIV>

If you're using tables, you might have to incorporate this into your code properly. Just a thought...
__________________
“The bitterness of a poor quality shirt will outlast the sweetness of a bargained price”
www.variantart.com
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 19th, 2006 Oct 19, 2006 9:17:13 AM -   #7 (permalink)
T-Shirt Lover
T-Shirt Fan

DirtyJerseys's Avatar
 
You can call me: Dirty
Member Since: Oct 2006
Location: Morristown, NJ
Posts: 49
Thanks: 0
Thanked 1 Time in 1 Post
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

Did a quick search on web... see if these steps will work:

To ALign a Table in the Center Try ths Following

<table align="center">
Adding Align=center will alin your Table in Center.


And to entire the Whole Page OR bunch of Tables Surround them with the DIV tag like this

<div align="center">

<table>....

</table>
<table>
..

</div>


Third way is to Align it at Certain point like this

<table style="top:100;left:100">
By adding Style Attribute it will ALign Table to 100px Top and 100px Left
__________________
Dirty Jerseys "making US a little bit dirtier" www.DirtyJerseys.com
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 19th, 2006 Oct 19, 2006 10:30:08 AM -   #8 (permalink)
Senior Member
T-Shirt Mogul


jdr8271's Avatar
 
You can call me: Jon
Member Since: Jun 2005
Location: Philadelphia
Posts: 1,029
Thanks: 0
Thanked 7 Times in 7 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

margin: auto; is center in css. or in html you can put the <center></center> tag around your content.
__________________
Anti Bush T-Shirts | Retro T-Shirts
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 19th, 2006 Oct 19, 2006 1:31:08 PM -   #9 (permalink)
Forum Member
T-Shirt Apprentice

gammonstein's Avatar
 
You can call me: Jason
Member Since: Jun 2006
Location: Charlotte, NC
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

another option to try. Look at a site that successfully has the thing centered, then copy the source code, paste it into the dreamweaver document, then delete what you don't want.
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 22nd, 2006 Oct 22, 2006 2:36:12 AM -   #10 (permalink)
T-Shirt Lover
T-Shirt Fan
Thread Starter

psonio's Avatar
 
Member Since: Oct 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

Ok, i tried the following, none of which worked:
  • #Wrapper in CSS
  • <div align="center"> in HTML
  • <center></center> in HTML
Maybe my webdesign skills are rather dreadful, so i didn't get it to work. I looked into the source code of some web2.0 sites to try to see how they are centered, but no dice.

Anybody?Help?
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 22nd, 2006 Oct 22, 2006 8:04:19 AM -   #11 (permalink)
Senior Member
T-Shirt Mogul


jdr8271's Avatar
 
You can call me: Jon
Member Since: Jun 2005
Location: Philadelphia
Posts: 1,029
Thanks: 0
Thanked 7 Times in 7 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

Quote:
Originally Posted by psonio
Ok, i tried the following, none of which worked:
  • #Wrapper in CSS
  • <div align="center"> in HTML
  • <center></center> in HTML
Maybe my webdesign skills are rather dreadful, so i didn't get it to work. I looked into the source code of some web2.0 sites to try to see how they are centered, but no dice.

Anybody?Help?
Code:
<style="text/css">
.centerdiv            { margin:auto; }
</style>

<div class="centerdiv">
content here
</div>
__________________
Anti Bush T-Shirts | Retro T-Shirts
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 22nd, 2006 Oct 22, 2006 8:48:30 AM -   #12 (permalink)
T-Shirt Lover
T-Shirt Fan

TiddliBoom.com's Avatar
 
You can call me: Dan
Member Since: Aug 2006
Location: Sweden
Posts: 44
Thanks: 0
Thanked 4 Times in 3 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

Quote:
Originally Posted by psonio
Hello good people,

I wish i had come across these forums way before i started my site.
I have a site going at psonio.gr with spreadshirt.

I am using Dreamweaver 8 and i am trying to figure out how to make the whole site center, no matter the user's resolution.
Can someone help?

Thanks in advance.
In most browsers, the site is probably already centered and working just fine. I haven't studied previous suggestions in detail, but from the ones I have looked at, they seem to suggest general ways of centering content, but unfortunatelly not considering the particulars in your explicit code. (if I missed someone who actually did that, I'm sorry).

The site was not made in Dreamweaver from the start, but in Microsoft Frontpage or some other MS application. This program has created some oddities that some browsers might react on.

The first thing is that you should have a correct Doctype definition. At the very top of the documents, delete this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0024)http://www.fushirts.net/ -->
and replace with this:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
Next is to move the width attribute to a place where it can make things happen. Right now, it's in the nested table's cell, which might make some browsers render the centering wrong. Delete the first 4-5 lines after the opening body tag:
Quote:
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>

<TR>
<TD vAlign=top width=800>
<TABLE width=752 border=0 align="center" cellPadding=0 cellSpacing=0 borderColor=#bcbcbc><!-- header -->
and paste this there instead:
Code:
<TABLE width="760" border=0 align="center" cellPadding=0 cellSpacing=0>
  
  <TR>
    <TD vAlign=top>
      <TABLE border=0 align="center" cellPadding=0 cellSpacing=0 borderColor=#bcbcbc><!-- header -->
(you had a width of 800 pixels before, but I think you ought to have less to allow space for scroll bars, etc. I put 770, but you might change to 760 ot even 750 if you like).

Lastly, the program didn't put parenthesis around the attributes (padding, width, cellspacing, etc). Most browsers accept them anyway, but it's a good thing to always do that. So, the above should be:
Code:
<TABLE width="760" border="0" align="center" cellPadding="0" cellSpacing="0">
  
  <TR>
    <TD vAlign="top">
      <TABLE border="0" align="center" cellPadding="0" cellSpacing="0" borderColor="#bcbcbc"><!-- header -->
I hope this will help. Good luck.

Cheers,
Dan
__________________
TiddliBoom.com
Proformica.com
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 23rd, 2006 Oct 23, 2006 10:30:05 AM -   #13 (permalink)
Forum Member
T-Shirt Member

TexasTShirts's Avatar
 
You can call me: Abdul
Member Since: Oct 2006
Location: Houston, Texas
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

Hey guys,

I'm not sure if this applies to any of your questions, but when I export a website with cells via Photoshop, all I do to center the images within the cells on the page is:

1. Press (Control + A) - Windows / (Apple + A) - Mac in Dreamweaver

2. Go into the Properties menu and hit the 'Center Align' button.

That works for me whenever I need objects within cells centered. If that doesn't work, try selecting individual cells and repeating step two. Hope this helps/pertains to anyone

Sincerely,
Abdul R. Mitha
Texas T-Shirts CEO
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 23rd, 2006 Oct 23, 2006 4:55:00 PM -   #14 (permalink)
T-Shirt Lover
T-Shirt Fan
Thread Starter

psonio's Avatar
 
Member Since: Oct 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

Quote:
Originally Posted by TiddliBoom.com
... considering the particulars in your explicit code...
Thank you Dan!

I actually tried to reply earlier, thanking you, but I think I screwed up and it wasn't posted. I looked at your site as well, and noticed that you offer web design. I might have some work for you when i decide to make my sites more complex.

Last edited by Rodney; October 23rd, 2006 at 05:24 PM. Reason: removed service request info - please ask quote type questions "off board" via Private Message (PM) or email :)
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!
Old October 24th, 2006 Oct 24, 2006 7:51:46 AM -   #15 (permalink)
T-Shirt Lover
T-Shirt Fan

TiddliBoom.com's Avatar
 
You can call me: Dan
Member Since: Aug 2006
Location: Sweden
Posts: 44
Thanks: 0
Thanked 4 Times in 3 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)


Default Re: How to center a website

Quote:
Originally Posted by psonio
Thank you Dan!

I actually tried to reply earlier, thanking you, but I think I screwed up and it wasn't posted. I looked at your site as well, and noticed that you offer web design. I might have some work for you when i decide to make my sites more complex.
No probs.
If you eventually need help, please do as Rod suggests; send me a PM and we'll take it from there.

Cheers,
Dan
__________________
TiddliBoom.com
Proformica.com
 
Digg this Post!Add Post to del.icio.us Tweet about this Post!

Tags: ,







This is a discussion about How to center a website that was posted in the Ecommerce Site Design section of the forums.

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Website Name, Strategy Question ironhead T-Shirt Marketing 5 March 13th, 2006 07:32 PM
Using Print mojo and spreadshirt on my website Deja Ecommerce Site Design 6 January 30th, 2006 08:37 PM


All times are GMT -8. The time now is 11:35 AM.


Copyright 2004-2012 T-ShirtForums.com. All rights reserved.