Prevent a string with no spaces from overflowing out of its boundaries - HTML CSS CSS Property

HTML CSS examples for CSS Property:overflow

Description

Prevent a string with no spaces from overflowing out of its boundaries

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">
.fixed-width {
   width:100px;
   border:2px solid Chartreuse;
   padding:6px;
   overflow-x:hidden;
}
</style> <!--  ww  w .  j  a v a2s .  co m-->
 </head> 
 <body> 
  <div class="fixed-width"> 
   <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentu</p> 
  </div>  
 </body>
</html>

Related Tutorials