Add big margin to child div - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div

Description

Add big margin to child 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">

#parent<!--from   w w w  .  java  2  s .  com-->
{
   border:1px solid black;
   background:#ddd;
   display:inline-block;
}
#child
{
   width:180px;
   margin:30px;
   background:grey;
   display:inline-block;
}


      </style> 
 </head> 
 <body> 
  <div id="parent"> 
   <div id="child">
     text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials