PDA

View Full Version : Gaps!


psychownage
09-26-2012, 11:59 AM
Hi,

New here, and first post. I have read the rules and something on this already exists, but it is dated to 2007 and It applies to a sidebar, not the top.

my site im developing is @ http://www.driffield.eu/en/

I want the top div touching the top of the window and the main block touching the top block.

I hate set all margins to 0px that seem relevant, without luck.

I'm a bit of a Dreamweaver noob, just watched the tutorials at fundamentals level, nothing more.

Any help of settings / code, would be greatly appreicated, please if you give code, tell me the part of the css file to stick it in, thank you :)

my css look like this:



@charset "utf-8";

.maintop {
margin:0;
padding:0;
font-family: Verdana, Geneva, sans-serif;
height: auto;
width: 100%;
margin-right: auto;
margin-left: auto;
-webkit-transition: opacity 1s ease 1s;
-moz-transition: opacity 1s ease 1s;
-ms-transition: opacity 1s ease 1s;
-o-transition: opacity 1s ease 1s;
transition: opacity 1s ease 1s;
background-image: url(../gfx/75pogs.png);
text-align: center;
padding: 0px;
margin-top: 0px;
margin-bottom: 0px;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
left: 0px;
top: 0px;
right: 0px;
bottom: 0px;
clip: rect(0px,0px,0px,0px);
}
.mainctr {
margin:0;
padding:0;
font-family: Verdana, Geneva, sans-serif;
background-image: url(../gfx/75pogs.png);
height: auto;
width: 900px;
margin-right: auto;
margin-left: auto;
padding: 0px;
margin-top: 0px;
margin-bottom: 0px;
}

gentleone
09-26-2012, 01:01 PM
Give your body, h1, h3 and the p tag which hold your navigation also a 'margin: 0' to zero out the browser defaults on these tags.

You might want to look into a CSS reset:
http://necolas.github.com/normalize.css/
or
http://meyerweb.com/eric/tools/css/reset/index.html

domedia
09-26-2012, 01:18 PM
And if you hit F 12 in your browser, you'll launch the developer tools that will make you see where the space is coming from in an instant 8)