Alamgeer Khan Alamgeer Khan - 21 days ago 5
CSS Question

Removing the distance between Body and Relevant Element

How to Remove The distance Between the Body and An Relevant positioned DIV as shown in the Image is Here



#rela {position:relative; width:100%; height:500px; clear:both; top:0; right:0; left:0;}
#absol {position:absolute; width:70%; height:400px; clear:left; float:left;}
#absol_2 {position:absolute; width:20%; height:400px; clear:riht; float:right;}

<div id='rela' style='background:green;'>

<div id='absol' style='background:red;'></div>
<div id='absol_2' style='background:purple;' ></div>

</div>




Answer

Use this in your css:

body{margin:0; padding:0}