HTML CSS examples for CSS Layout:Responsive Media
Make the item active when a media request is made
<html lang="en"> <head> <style> div:nth-child(1) { background:Chartreuse; color:yellow; } div:nth-child(2) { background:blue; color:pink; } #media_wrapper {<!--from w ww. ja v a 2 s .c o m--> height:100%; display:none; } @media only screen and (max-width: 480px) { #media_wrapper { height:100%; display:inline-block; width:100%; } } </style> </head> <body translate="no"> <div id="media_wrapper"> Lorem </div> <div> Lorem </div> </body> </html>