css - white space between divs, simple HTML -


i have searched , searched on site solution , tried apply results simple html none have appeared work.

i'm sure there easy way because @ moment there isn't code explain.

i want simple layout, 3 divs. 1 main page div containing 2 horizontal divs, want 2 inside divs contain picture used div backgrounds enclosed in main page div, can backgrounds on cannot rid page of white line, i'm sure guys sick of reading about.

i line appearing between "header" , "site" divs. i'm sure easy solution.

i have want keep html simple possible , plan have 3 three links put in once space has gone, i'm sure can apply solution further divs.

i'm struggling upload code, please advise

html:

<html>     <head>         <link rel="stylesheet" type="text/css" href="css.css">     </head>     <body>         <div id="mainwrap">             <div id="header">             </div>             <div id="site">             </div>         </div>     </body> </html> 

css:

#header{     width:1080px;     margin:0;     height:285;     background: url(header.jpg);     float:left;  }  #site{     width:1080px;     margin:0;     height:480;     float:left;     background: url(main.jpg);    }  #mainwrap{     width:1280px;     height:750px;     margin:auto;     background-color:#ffffcc; } 

many if can post solution.

you're having problem because of font size of container. set line-height , font-size of container 0 , space disappear.

if still doesn't fix it, remove whitespace (including tabs or line breaks) html code blocks touching each other so:

</div><div> //   ^^ no space here 

however, remember font style declarations cascade down container's children, sure set font-sizeand line-height normal inside them.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -