MyBB Community Forums

Full Version: Centering the forum kind of like this one?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Anyone know a good place to start at if I am looking to center my forum a lot like this one is at the moment?
what is your forum url ? which theme you are using ?
can you show your requirement with a image ..
You will want to change your .wrapper class width in global.css, change it to something like:

width: 65%;margin: auto auto;

Make sure that the margin auto is there as this is what centre's the content.
(2018-03-18, 04:25 PM)Harry K. Wrote: [ -> ]You will want to change your .wrapper class width in global.css, change it to something like:

width: 65%;margin: auto auto;

Make sure that the margin auto is there as this is what centre's the content.

Ok I added that but nothing changed. The code also has extra CSS attributes:
min-width: 970px;
max-width: 1500px;
margin: auto auto;

Maybe i should change that max or min width?

(2018-03-18, 04:12 PM).m. Wrote: [ -> ]what is your forum url ? which theme you are using ?
can you show your requirement with a image ..

i don't have it up yet still developing.

I just would like to make the board similar to the way the forum is. IT is centered and has a smaller width to it. The one I have is a new install and its real wide

(2018-03-18, 04:46 PM)Resident Rich Wrote: [ -> ]
(2018-03-18, 04:25 PM)Harry K. Wrote: [ -> ]You will want to change your .wrapper class width in global.css, change it to something like:

width: 65%;margin: auto auto;

Make sure that the margin auto is there as this is what centre's the content.

Ok I added that but nothing changed. The code also has extra CSS attributes:
min-width: 970px;
max-width: 1500px;
margin: auto auto;

Maybe i should change that max or min width?

(2018-03-18, 04:12 PM).m. Wrote: [ -> ]what is your forum url ? which theme you are using ?
can you show your requirement with a image ..

i don't have it up yet still developing.

I just would like to make the board similar to the way the forum is. IT is centered and has a smaller width to it. The one I have is a new install and its real wide



Heres a template something like what I am shooting for. The main part of the body is not as wide as the screen: centered and smaller width.

http://demos.themefreak.net/?theme=FlatOne

(2018-03-18, 04:25 PM)Harry K. Wrote: [ -> ]You will want to change your .wrapper class width in global.css, change it to something like:

width: 65%;margin: auto auto;

Make sure that the margin auto is there as this is what centre's the content.

So that worked. I had to clear the cache to notice it.

But now its to the left and not centered
Does the .wrapper class definitely contain the margin: auto auto; exactly like stated?

If you are using a responsive theme, or one that is heavily modified, there is possible other classes in the css that over-ride the wrapper. Try right clicking and using inspect element, then disabling some of the css around the header. This helps to quickly figure out errors when your a little stuck.

Other than that as .m. stated it will be hard to help you without seeing an image or being able to visit your site.
Pretty sure it should be

 margin: 0 auto;