Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to remove white border around the div

Tags:

html

css

I am trying to develop a web site from scratch. Here is the code

<html>
<head>
</head>
<body >
<div id="top" style="height:200px;background-color:green">
</div>
<div id="middle" style="height:800px;background-color:white">
</div>
<div id="footer" style="height:200px;background-color:green">
</div>

</body>
</html>

Problem is that there is a white space around above div tags. I can remove white space using margin: -10px; property. But I don't like to handle it that way. Is there way to handle this in decent way in css?

like image 275
newday Avatar asked Jan 26 '13 18:01

newday


1 Answers

<body style="margin: 0;">

like image 94
Cobra_Fast Avatar answered Oct 05 '22 08:10

Cobra_Fast