CSS question -- removing a space at top of site
How do I remove the gray area here: https://i开发者_运维知识库mg.skitch.com/20110808-ncu19ep6fw47s9pxhqxa99qmcb.jpg
In style.css, padding is:
padding: 0;
...I've tried changing this:
#page { margin-top: 0; }
to the following things:
#page { margin-top: 5px !important; }
#page { margin-top: -5px !important; }
#page { margin-top: 0px !important; }
#page { margin-top: 0 !important; }
...but these things showed no noticeable change.
Here's the site in case it helps: http://richardclunan.com/
Thanks,
Give the below style:
body {
margin:0px;
padding:0px;
}
#page {
margin:0 auto;
max-width:1000px;
}
You probably need to add the same rules to the <body>
and/or <html>
elements:
body, html { margin: 0px; padding: 0px; }
You have this:
#page {
margin: 2em auto;
max-width: 1000px;
}
in your style.css
. That gives #page
a top and bottom margin of 2em. You probably want this:
#page {
margin: 0 auto 2em auto;
max-width: 1000px;
}
That's the same as margin: 2em auto
but with a zero top margin.
change this css style:
#page {
margin: 2em auto;
max-width: 1000px;
}
to
#page {
margin: 0px auto;
max-width: 1000px;
}
also change
#branding {
border-top: 2px solid #BBBBBB;
padding-bottom: 10px;
position: relative;
z-index: 2;
}
to this:
#branding {
padding-bottom: 10px;
position: relative;
z-index: 2;
}
精彩评论