javascript - Different stylesheet for different device -


i have question: how automatically change website based on device type? know there like

@media screen , (max-width:720px){/*code mobile here*/} @media screen , (min-width:1280px) {/*code pc here*/} 

but think can cause problems on big resolution mobile devices , low resolution desktop monitors. wonder there way of changing css file/selecting exact part of css code based on device type, smartphone, tablet or pc?

anything works help. if not clear, try explain better. if i'm wrong, correct me.

you can use these:

// large devices (desktops, less 1200px)  @media (max-width: 1199px) { ... }   // medium devices (tablets, less 992px)  @media (max-width: 991px) { ... }   // small devices (landscape phones, less 768px)  @media (max-width: 767px) { ... }   // small devices (portrait phones, less 576px)  @media (max-width: 575px) { ... } 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -