Moving the position of the sidebar - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Position

Description

Moving the position of the sidebar

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">
fieldset<!--from   w  w  w.  j  a  va2s.  co m-->
 {
   border:2px solid Chartreuse;
   border-radius:6px 6px 6px 6px;
   position:relative;
   white-space:nowrap;
   margin:41px 21px 21px 21px;
   display:inline-block;
   *zoom:2;
   *display:inline
}

legend
 {
   font-weight:bold;
   margin-left:6px;
   position:absolute;
   height:21px;
   top:-26px;
   left:-7px;
   background:white;
   padding:5px 11px 0 11px;
   border:2px solid yellow;
   border-bottom-color:blue;
}

.scroll div
 {
   max-height:181px;
   overflow:auto;
   overflow-x:hidden;
   padding:11px 21px 11px 11px;
   position:relative;
}
</style> 
 </head> 
 <body> 
  <form> 
   <fieldset class="scroll"> 
    <legend>Lorem i</legend> 
    <div>
      Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br>Lorem ipsum dolor sit amet, 
     <br> 
    </div> 
   </fieldset> 
  </form>  
 </body>
</html>

Related Tutorials