views:

69

answers:

4

Hi there.

I have got a css problem.

http://www.luukratief-design.nl/dump/parallax/index.html

I cant get this page to align center. Before i get the answer to use "text-align: center;" on the body, i already did.

The page 100% validates (CSS and HTML).

Please help, never had this before.

+3  A: 

Set the left and right margins of the #wrapper div to auto

#wrapper{
margin:0 auto;
}
Amarghosh
Great thanks! dont see why it is necessary, but it works like a charm, great help!
Luuk
+1  A: 

add this to you wrapper:

margin-left:auto;
margin-right:auto;
dale
+1  A: 

Use this css to align to center:

<style>
  #your_div_id {margin:0px auto;}
</style>
Sarfraz
+1  A: 

to align a page in the center you can place all the content of the page inside a container div and set these css properties

body
{
    text-align: center; //for ie 6

}
#main_wrapper
{
    text-align: left;
    width: 1000px; //any width you want
    margin: 0 auto;

}

here main wrapper is the div that contains all the content

Pankaj Kumar