Hi all,
I'm looking to make the top of the content of my whole site line up flush with the top of the browser window. So there is no space in between. Anyone know how to do this?
if the answer involves editing the CSS stylesheet, please be as specific as possible about where / which code to edit. thanks!
-ben
http://www.metalsucks.net
As you can see there's a gap, maybe 50 pixels or so, between the site and the top of the window.
In your theme's style.css file, look for this:
/* Begin Structure */
body {
margin: 0 0 20px 0;
padding: 0;
}
#page {
background-color: white;
margin: 20px auto;
padding: 0;
width: 760px;
border: 0px solid #959596;
}
In the #page section, change this
margin: 20px auto;
to this
margin: 0px auto 20px;
After uploading your style.css, hold down shift while clicking reload to flush the cache.
You, sir, are brilliant. Thank you very much. Now for the obvious follow up question -- how to make the bottom margin flush with the bottom of the window? I tried the next logical step of making the code above as follows:
margin: 0px auto 0px;
That didn't do the trick. Any suggestions?
You were halfway there with your intuition. (Actually, you can just delete the second "0px" part.)
Write above where you changed it the first time, in the body section, change this:
margin: 0 0 20px 0;
to this:
margin: 0;
Voila!
Very nice. Thank you kindly.