css - Div "default margins" out of nowhere -


Even after several lines I have written CSS and HTML, CSS-behavior still surprises me Manages - In Bad

I was putting a sample site for a friend to show him how to construct his layout, but Firefox 3.0.5 and IE8 # Headers, # Contents and # Footers- Divs Out Nowhere if I switch to IE7 mode Margin disappears.

CSS:

  html, body {background-color: #fff; Margin: 0; Padding: 0; Width: 100%; } #page {background-image: url ('bg_gradiant.png'); Double-repeat: repeat-y; Width: 950px; / * 770px + 2 * 90px; * / Margin: 0 auto; Padding-left: 90px; } # Headers {Width: 770px; Margin: 0; Padding: 0; } #hadder # row 1 {background color: # 9ab3ba; Height: 50px; } #hadder # row2 {background color: # 517279; Height: 50px; } # Content {width: 770px; Background color: # d7e9ed; } #footer {background-color: # 5eb6cc; Width: 770px; Height: 150px; }  

HTML:

  & lt ;! DOCTYPE html public "- // W3C // DTD XHTML 1.0 Transcription // N http: // www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> & Lt; Html xml: lang = "de" xmlns = "http://www.w3.org/1999/xhtml" & gt; & Lt; Top & gt; & Lt; Meta http-equiv = "content-type" content = "text / html; charset = UTF-8" /> & Lt; Meta http-equiv = "content-style-type" content = "text / css" /> & Lt; Link rel = "stylesheet" type = "text / css" href = "./ style.css" /> & Lt; Title & gt; Test & lt; / Title & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Div id = "page" & gt; & Lt; Div id = "header" & gt; & Lt; Div id = "row1" & gt; & Lt; / Div & gt; & Lt; Div id = "row2" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div id = "content" & gt; & Lt; P style = "height: 600px" & gt; Beware of content & lt; / P & gt; & Lt; / Div & gt; & Lt; Div id = "footer" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

You can see this page here:

Browsing through IE Developer Tools and Firebug has shown me that they set the default-margin values ​​for these devices There were no, but no one can see, they are there, hope that you can give me an indication of how to get rid of them - it's seriously making me crazy.

Thanks in advance!

This is not a DIV, but the margin is set by default in P tag. I tested it in 0 and the space disappeared.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -