Add Border to vertical scrolling div - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Div Border

Description

Add Border to vertical scrolling 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">

#top_bar {
   width: 60%;
   height: 50px;
}
#main_mask {<!--   w  w  w  .  j  a  v a 2  s .c  o m-->
   width: 60%;
   height: 100%;
   overflow: hidden;
   display: block;
   margin-left: auto;
   margin-right: auto;
}
#main_scroll {
   width: 100%;
   height: 100%;
   overflow-y: scroll;
   padding-right: 17px;
   -webkit-box-sizing: content-box;
   -moz-box-sizing: content-box;
   box-sizing: content-box;
}
#content {
   padding: 5px 10%;
   border: 1px solid #999;
   text-align:center;
   height: 100%
}


      </style> 
 </head> 
 <body> 
  <div id="top_bar">
    Top bar 
  </div> 
  <div id="main_mask"> 
   <div id="main_scroll"> 
    <div id="content">
      This is some variable content.
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials