Overflow trick - HTML CSS CSS Property

HTML CSS examples for CSS Property:overflow

Description

Overflow trick

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Lorem ipsum dolor sit amet, consectetu</title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
.container {<!--   ww w  .  j a  v a2s.c  o  m-->
   display:inline-block;
   width:501px;
   height:76px;
   overflow:visible;
   background:Chartreuse;
   margin:31px 0;
   padding:11px;
}

.container span {
   display:inline-block;
   margin-top:-26px;
   width:100%;
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare vitae tempor hendrerit, luctus at neque. Phasellus sed quam pharetra, tincidunt tortor in, pharetra nisl. Maecenas aliquam luctus mauris, vitae venenatis diam imperdiet vel. Donec tortor diam, pretium vitae nibh vitae, consectetur lacinia sem. Proin luctus facilisis volutpat. Ut semper sit amet purus quis ornare. Quisque lobortis neque vitae tempor iaculis. Aliq</span> 
  </div>  
 </body>
</html>

Related Tutorials