Bottom margin inside overflow:auto element - HTML CSS CSS Property

HTML CSS examples for CSS Property:overflow

Description

Bottom margin inside overflow:auto element

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.  j ava  2 s . co  m-->
   font-family:'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;
   padding:100px;
   font-size:14px;
   position:relative;
   background:blue;
}

div {
   background:Chartreuse;
}

div.outer {
   position:absolute;
   top:31px;
   left:31px;
   width:100px;
   height:100px;
   overflow:auto;
   padding:6px;
}

div.inner {
   border:6px solid yellow;
}
</style> 
 </head> 
 <body> 
  <div class="outer"> 
   <div class="inner"> 
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat</p> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials