@media only screen and (max-width: 600px){ // Styling goes in here. }
class='myClass'
id='myID'
.myClass { //Properties go here }
#myID { //Properties go here }
<html> <head> <style> .myDiv { color: blue; width: 300px; height: 100px; // Blue text and 300px width for a screen bigger than 600 pixels. } @media only screen and (max-width: 600px){ .myDiv { color: black; width: 100%; height: 100px; // Black text and full width for a mobile. } } </style> </head> <body> <div class='myDiv'>This is text!</div> </body> </html>