Responsive design to hide div - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Responsive design to hide div

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">
@media only screen and (max-width: 640px)  {
   div:first-child {
      display:none;
   }<!--  w ww .ja va 2s .c om-->

}
</style> 
 </head> 
 <body> 
  <div id="first">
    Lorem ipsum dolor sit amet, consectetur adip 
  </div> 
  <div id="second">
    Lorem ipsum dolor sit amet, c 
  </div>  
 </body>
</html>

Related Tutorials