Add media query in css for max-width: 1024px and change background - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Add media query in css for max-width: 1024px and change background

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 (max-width: 1024px)  {
   body {<!--  w ww .  ja  va 2 s  . co m-->
      background:red;
   }

}
</style> 
 </head> 
 <body>  
 </body>
</html>

Related Tutorials