Centering website with existing template.

ghwan8

New Member
Hi guys! I'm having a very difficult time trying to center my website.

I was able to change the width to 980 but all the contents are on the left side of the screen.

I wish to have a margin on the left side and the right side like this site
http://www.pinkice.com/

I'm using Flashecom as the host for my website and I'm using a pre-made template.

Is it possible to center the website when using a pre-made template?

Help much appreciated guys!
 

jnjc

New Member
Can you supply the url to your site, it'll be easier to help if we can see what you've got so far...
 

mezangath

New Member
u can just wrap the entire site in a div tag and then center the div. I think that would be the easiest way.
 

Modern_Media

New Member
First off - do a GLOBAL reset of your CSS components:
Code:
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 100%;
}

Next, style your body tag:
Code:
body {
  margin: 0;
  padding: 0;
  text-align: center; /* IE browser centering trick. */
}

You should have a wrapper DIV that all of your content sits in:
Code:
#wrapper {
  text-align: center;
  margin: 0 auto; /* this is how you center using CSS */
  padding: 0;
}

Just make sure that any DIVs inside your wrapper have text-align property set to this:

text-align: left; /* sets text back to left alignment */
 
Top