avoid horizontal scroll on mobile web with responsive web design - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

avoid horizontal scroll on mobile web with responsive web design

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">
#fillX<!--from  w w  w .j  a  va  2 s  . com-->
 {
   background:red;
   width:100%;
   opacity:0.6;
}

#childXFill
 {
   background:blue;
   margin:0 -11px;
   opacity:0.6;
}
</style> 
 </head> 
 <body> 
  <div id="fillX"> 
   <div id="childXFill">
     &nbsp; 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials