• I’ve recently become incharge of running the website https://disordermagazine.com so im new to all this wordpress stuff.

    I was wondering, how can i center the whole website? i hate how there is a massive gap on the right.. bigger the screen res the bigger the gap is and i want to even it out by centering the entire thing

    Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • In some cases you can set the main container div to margin: auto; in the CSS. Sometimes you have to wrap the entire thing in a new parent container div and set the new div that way.

    Thread Starter fangedfreak

    (@fangedfreak)

    this is what i have so far in my CSS:

    .alignleft {
    	float:left;
    	margin-right:1em;
    	margin-bottom:1em;
    }
    .alignright {
    	float:right;
    	margin-left:1em;
    	margin-bottom:1em;
    }
    .aligncenter {
    	display: block;
    	margin-left: auto;
    	margin-right: auto;
    }
    .wp-caption {
    	border: 1px solid #ddd;
    	text-align: center;
    	background-color: #f3f3f3;
    	padding-top: 4px;
    	margin: 10px;
    	/* optional rounded corners for browsers that support it */
    	-moz-border-radius: 3px;
    	-khtml-border-radius: 3px;
    	-webkit-border-radius: 3px;
    	border-radius: 3px;
    }
    .wp-caption img {
    	margin: 0;
    	padding: 0;
    	border: 0 none;
    }
    .wp-caption p.wp-caption-text {
    	font-size: 11px;
    	line-height: 17px;
    	padding: 0 4px 5px;
    	margin: 0;
    }

    That’s not all you have, but you don’t have to post your CSS here b/c anyone who goes to your site can see it.

    The first two divs in your source are #page and .wrapper. You need to add margin: auto; to one of those (probably the first one). I’m also not sure why you have .wrapper set to clear: both; since there is nothing to clear. There are no floating elements up to that point.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Center entire website?’ is closed to new replies.