Example of CSS for mobile devices

If you need to easily change your CSS for mobile devices but you don't want to create a new CSS stylesheet for every device, you can simply create different CSS styles for different screen sizes.

@media only screen and (max-width: 5120px) {
place here your CSS code for desktop
}

@media only screen and (max-width: 991px) {
place here your CSS code for tablets
}

@media only screen and (max-width: 480px) {
place here your CSS code for mobile devices
}

Edaimon De Juan

Urban Data Analysis

Data analysis and visualisation

Smart Cities Articles

 

CONTACT

Get in touch

Signup to my newsletter: