Set margin property for div - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div

Description

Set margin property for div

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
body {<!-- w  w  w. ja va2 s .co m-->
   margin:0;
   padding:0;
}

div {
   background:yellow;
   width:78px;
   height:78px;
   border:2px dotted Chartreuse;
}

#one {
   margin:0px 22px 42px 42px
}
</style> 
 </head> 
 <body> 
  <div id="one"></div>  
 </body>
</html>

Related Tutorials