Forums » Customize

centering site on page

jonnyb
UNITED KINGDOM
2009-02-27 13:16:50
Permalink Post
 

hello,

a pretty basic question, I have tried centering every individual div in my css (using margin:0 auto etc) but nothing seems to work. would someone be able to talk me through how to do this? I have a good knowledge of css (I thought!) but i cannot get this one to work.

cheers
Jonny

jodi
UNITED KINGDOM
2009-02-27 15:39:51
Permalink Post
 

Try this!

You have to apply this either to the body or to a div that wraps everything on the page that you want to center. 

  1. body
  2. {
  3. width: 960px;
  4. margin: 0 auto;
  5. }
jodi
UNITED KINGDOM
2009-02-27 15:40:14
Permalink Post
 

Well, that code tag backfired. But I think you can see what I mean.

Vaska A
I WROTE THIS
2009-02-27 16:15:52
Permalink Post
 

No, that really will not work...needs much more than that.

Vaska A
I WROTE THIS
2009-02-27 16:40:37
Permalink Post
 

This is fast and crude...but you could take it from here...

Add and/or replace things in your style.css file:

  1. body { text-align: center; background: #000; }
  2. #wrapper { width: 960px; margin: 0 auto; text-align: right; background: #fff; }
  3. #menu { width: 215px; float: left; }
  4. #content { margin: 0 0 0 215px; }
  5. .clear-both { clear: both; }

In your template add a wrapper around ALL of your html in the body tags...the bottom portion needs a clear as well...

  1. <div id='wrapper'>
  2. <!-- ALL THE OTHER CODE -->
  3. <div class='clear-both'><!-- --></div>
  4. </div>

Remove the ie.css part from your header...you don't need this one anymore...

And this will get your started.

panoramah
PORTUGAL
2009-08-26 15:37:01
Permalink Post
 

sorry but i'm kind of ignorant what's
"In your template add a wrapper around ALL of your html in the body tags"

thanks!

arsondpi A
GREECE
2009-08-26 19:49:00
Permalink Post
 

just after the <body> tag add the <div id='wrappper'>
If it all still looks fuzzy, find a centered site and check out the source code - it can't be easier than that... I think so at least.

panoramah
PORTUGAL
2009-08-26 21:03:37
Permalink Post
 

i already managed to center the letters in the body
but i don't manage to center the exhibits in the window
where do i find the source code?

sorry... arsondpi..

arsondpi A
GREECE
2009-08-26 21:22:35
Permalink Post
 

...check the participants list and find a site with centered content....
It's easier than you think. Keep on trying...

...and have a read at the forum rules please...

imoore
DENMARK
2010-02-15 14:43:45
Permalink Post
 

Hey I am new to all this here so please excuse me if this a dumb question.

"In your template add a wrapper around ALL of your html in the body tags...the bottom portion needs a clear as well..."

Where is the template located ?? Whats its filename ?

Thanks a lot for the help.
Ian.

Vaska A
I WROTE THIS
2010-02-15 15:03:10
Permalink Post
 

In Useful Threads there are two links in red - read these. It should be clear where things are after you read them.

;)

imoore
DENMARK
2010-02-15 15:08:37
Permalink Post
 

Thanks. Ill do that!

mrd12
GERMANY
2010-02-15 16:08:41
Permalink Post
 

Hello,

I am able to center my menu on the left side, but I am not able to move everything that is in the container on the right side down to be on one line with the menu.
I have checked out other centered sites with Indexhibit but I can't figure out what I have done wrong.

My website: http://anyd.bplaced.net/

For example the 'Impressum': it is glued on the top and I want to move it a little bit down. http://anyd.bplaced.net/impressum/

Thank you for your support!

mrd12
GERMANY
2010-02-15 16:15:15
Permalink Post
 

Problem solved! I have forgotten margin-top

:)

ekettelerij
NETHERLANDS
2010-02-18 21:35:05
Permalink Post
 

My Webpage.

Hello, first of all, thanks for the great theme!
Second, i could need some help.

Is there a way to use images instead of text for my button's?
Basicly what i'm trying to do is make my site like the picture on the index page of my website.

Im just starting css/html/php and like to call myself a beginner.

Thanks for you time!

arsondpi A
GREECE
2010-02-18 23:19:32
Permalink Post
 

Well you can either use Cufon to embed the font or use images.

So search the forum for Cufon or images as navi-titles (or something like this - i don't remember...)

Showing 1 - 16 of 16 posts in Forum > Customize > centering site on page
 

You need to be logged in to post.