Jump to content

Centre In The Browser


ben03
 Share

Recommended Posts

I used the following technique to allow pages to align centrally in the browser:

body		{			font-family: Helvetica, Verdana, Arial;  			font-size: 12px;			color: #333333;			background-image:			url('images/layer2.gif');			background-repeat: repeat;			text-align: center;			}#outercontainer{			position: relative;			width: 910px;			height: 1560px;			background-color: #333333;			z-index: 1;			}

All the items in the #outercontainer are placed using absolute positioning. #outercontainer is the only part using relative positioning and the central alignment in the body tag kept it central. That was until the new firefox, IE and Safari and it now no longer works. The page just goes left in the browser. How can I overcome this?

Edited by ben03
Link to comment
Share on other sites

Giving #outercontainer margin: 0 auto should center it.

Link to comment
Share on other sites

Welkommen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...