MyBB Community Forums

Full Version: center container
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello, my container seems to be pushed over to the right..
how do i center it?

I have tried using:
left: x%
right: x%
position: relative;
margin: auto auto;

but still no luck..

this is my css for my body and container:
body {
	padding-top: 50px;
  	padding-bottom: 50px;
  	padding-left: 50px;
	padding-right: 50px;
  	background: #fff;
	background-image: url("/images/backgrounds/20130512_180856-1080px.jpg");
	background-attachment: fixed;
	background-size: cover;
	line-height: 1.4;
	margin: auto auto;
  	position: relative;
  	overflow-y: scroll;
	color: #333;
	width: 76%;
	font-family: Tahoma, Verdana, Arial, Sans-Serif;
	font-size: 13px;
}

#container {
	opacity: .9;
	border: 8px solid #000;
	border-radius: 10px;
	text-align: left;
	line-height: 1.4;
	margin: auto auto;
	position: relative;
	min-width: 990px;
   	width: 76%;
	font-family: Tahoma, Verdana, Arial, Sans-Serif;
	font-size: 13px;
}

test account:
user: TEST
Pass: testing

site link in signature
remove width: 76%; from body
cheers, its centered on the likes of laptops etc. now but still not on mobile devices (or at least not mine..)
any reason for this?
(2014-10-13, 08:27 AM)Brazz Wrote: [ -> ]cheers, its centered on the likes of laptops etc. now but still not on mobile devices (or at least not mine..)
any reason for this?

maybe a browser cache issue....  Toungue
(2014-10-13, 09:29 AM)mmadhankumar Wrote: [ -> ]
(2014-10-13, 08:27 AM)Brazz Wrote: [ -> ]cheers, its centered on the likes of laptops etc. now but still not on mobile devices (or at least not mine..)
any reason for this?

maybe a browser cache issue....  Toungue

nope... still over to the right lol..
cleared cookies/cache etc. and its still hugging the right hand side of the screen.. Sad