MyBB Community Forums

Full Version: Can't Center #Container
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to center the container of my forums after adding a 95% width to it, and I have tried to do
margin: 0; auto
and it did nothing. Below is a Screenshot of the problem and the #Container coding.

#container {
	width: 85%;
	color: #ccc;
	text-align: left;
	line-height: 1.4;
	
	
	
	font-family: 'Droid Sans', sans-serif;
	font-size: 13px;
}

[Image: ZP3p1m6ORQGF5ALy-2A1TA.png]
Try adding margin: 0 auto; in .body or #wrapper.
body {
	background: #171b1d	url(images/revolution/bg.png) repeat;
	color: #ccc;
	text-align: center;
	line-height: 1.4;
	margin: 0 auto;
	overflow-y: scroll;	
	font-family: 'Droid Sans', sans-serif;
	font-size: 13px;
}
.wrapper {
	margin: auto auto;
}
Tried to search for #wrapper and all I had was .wrapper, but this didn't fix anything.

Fixed it.

Correct coding

#container {
	width: 90%;
	color: #ccc;
	text-align: left;
	line-height: 1.4;
	margin: auto;
	
	font-family: 'Droid Sans', sans-serif;
	font-size: 13px;
}