Fill h3 element in a div with a horizontal scroll bar - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Scrollbar

Description

Fill h3 element in a div with a horizontal scroll bar

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">
.OutputDiv {<!--   ww w .  j a v  a  2  s  . co  m-->
   background-color:Chartreuse;
   overflow:auto;
   border:3px solid yellow;
   width:501px;
}

.OutputDiv>div {
   display:inline-block;
}

h3 {
   margin-top:0px;
   background-color:blue;
}
</style> 
 </head> 
 <body> 
  <div class="OutputDiv"> 
   <div> 
    <h3>My Title is Here</h3> 
    <pre>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
               </pre> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials