CSS - Looking For An Explanation.
What I don't understand about the following code is why the body background color is showing inbetween the divs that mark the header, content, and footer.
I want no separation between the divs (margin 0, or so i thought). Can someone explain what's going on? Help very much appreciated. <html> <head> <style> body { background-color: black; } #header { background-color: red; margin: 0; } #content { margin:0; background-color: #ffffff; } #footer { margin: 0; background-color: red; } </style> </head> <body> <div id="header"> <h3>Header</h3> </div> <div id="content"> <p>Content</p> </div> <div id="footer"> <h3>Footer</h3> </div> </body> </html> Similar TutorialsHello I would like to know the difference between: *name .name #name thanks Hi there, Just playing around with some CSS menu tricks when I came accross this piece of CSS which I don't understand. Code: #nav li:hover ul ul, #nav li:hover ul ul ul, #nav li:hover ul ul ul ul{ display: none; } #nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul{ display: block; } I know that it is being used to display and hide a popup menu, on mouse over. How is this read though? Thanks. Hi, I have been trying to get up to speed on the workings of css positioning and have hit a stumbling block very early on. I would like to know what 'normal' means when the w3schools docs say that: (I'd provide a link but this site forbids me to do so) 'A relative positioned element is positioned relative to its normal position.' Could anyone provide a definition or explanation? I'm battling to figure out the basics here. Thanks Jim Hi, i need a simple, clear and easy to understand explanation of the parameters given to the CSS 'clip' property. i understand what the clip property does in essence - basically clips a rectangle from the given image - but i do not understand how the points given to the rect() function work - i cannot visualise it. My book does not describe it very well and the websites i have visited dont either. Therefore id be grateful if someone could give me a simple explanation Thanks |