Forums

How do i get the whole page to center in the middle of the screen? (3 posts)

wordpressmatt
Member
Posted 2 months ago #

OK. I've looked and looked and searched and searched. I'm new and I know this is a simple fix but I can't find it...

Does anyone know how to adjust the CSS so that the entire blog is centered in the user's screen?

Here's my blog...
www.maritimejobfinder.com

and here is the css I'm using

You'll note that, now, my blog stretches across the entire screen and I want to tighten it up...

If anyone could help I would really appreciate it.

Matt

webfwrd
Member
Posted 2 months ago #

Just put it in a wrapper. Following codes may help -

CSS

#wrapper {width:800px}
body {margin:0 auto}

HTML

<body>
<div id="wrapper>
Rest of your code
</div>
</body>

drewactual
Member
Posted 2 months ago #

add to css:

#wrapper {
width:700px; /*or width you want can be %, em, px, whatever*/
margin:auto;
}

the idea is to assign a width, and then use auto margin to center it. the right way to do it is to assign the width declaration to your body tag, and auto margin it there... but you can split it up elsewhere if you so like. I didn't dig too deep into your css because it is not constructed in a way that is easy to quickly follow.. but what I told you is the jest of centering stuff...and should serve you well.

Reply

You must log in to post.

About this Topic

RSS feed for this topic Started 2 months ago by wordpressmatt Latest reply from drewactual WordPress version: 2.6 This topic is not resolved


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser