Using @media to change width - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Media

Description

Using @media to change width

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">
.test {<!--from   ww  w. j av a 2  s. c  o  m-->
   width:201px;
   height:100px;
   background:Chartreuse;
}

@media screen and (min-width: 1024px)  {
   .test {
      width:1001px;
   }

}
</style> 
 </head> 
 <body> 
  <div class="test"></div>  
 </body>
</html>

Related Tutorials