3 Replies - 597 Views - Last Post: 07 December 2012 - 04:35 AM

#1 AIintern  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 53
  • Joined: 06-June 12

Centering

Posted 27 November 2012 - 12:09 PM

Ok. I know this is a newbie question, but I have problems Centering my website.

Ill use Priceline for an example of what I want

http://www.priceline.com/

See how everything is centered vertically? (the blue box with the white box in it)

How do I do that?

I usually end up guessing with pixels :(

Is This A Good Question/Topic? 0
  • +

Replies To: Centering

#2 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3397
  • View blog
  • Posts: 9,599
  • Joined: 08-June 10

Re: Centering

Posted 27 November 2012 - 12:20 PM

View PostAIintern, on 27 November 2012 - 08:09 PM, said:

See how everything is centered vertically? (the blue box with the white box in it)

actually, I dont see anything Id consider vertically centered.
Was This Post Helpful? 0
  • +
  • -

#3 jbatphoto  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 22
  • Joined: 24-October 12

Re: Centering

Posted 27 November 2012 - 06:17 PM

Do you mean the body of the website? In the body of your css just do
margin:0 auto;


Was This Post Helpful? 0
  • +
  • -

#4 DaveBromley  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 6
  • Joined: 04-December 12

Re: Centering

Posted 07 December 2012 - 04:35 AM

from my all be it limited experience you just need to play with your borders, margins and padding.

The white box on the blue background is just a Div tag ie Wrapper or something similar the boxes inside this are the separate div's, that have been stepped in using a margin.

If you are talking about making sure that your main section is centred in the page then as above set margin to auto

HTH

Dave
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1