+ 1

How to make theme on mobile different on destop?

22nd May 2017, 4:59 PM
Roland Doctor
Roland Doctor - avatar
2 Answers
+ 12
@media (max-width: 767px) { /* This works in smartphone only */ body { background-color:#000; } } /* 767, 480, 360 */ [ EDIT for @Apel ] - Thank you for your completeness, i choose a CSS solution because it should be the easiest way to work with sizes ^_^
22nd May 2017, 5:11 PM
Maz
Maz - avatar
+ 1
media queries with just width condition doesn't tell you that it is mobile device or not. it just tells the browser window size, which can be resized by the user. what Maz answered is correct if you want to apply different style based on the browser window size
22nd May 2017, 5:28 PM
Apel Mahmod
Apel Mahmod - avatar