HTML CSS examples for CSS Layout:Responsive Media
reposition things in a media query
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #mobileImg {<!-- w ww. j a va 2 s . c o m--> display:none; } @media only screen and (max-width: 768px) { #desktopImg { display:none; } #mobileImg { display:block; } } </style> </head> <body> <img src="https://www.java2s.com/style/demo/Firefox.png" alt="W3Schools.com" id="desktopImg"> <nav> <!--Menu items--> <a href="">Lorem </a> <a href="">Lorem </a> <a href="">Lorem </a> <a href="">Lorem </a> </nav> <img src="https://www.java2s.com/style/demo/Opera.png" alt="W3Schools.com" id="mobileImg"> </body> </html>