is it possible to hide to overflow only if the user is on a computer or something other then a phone? I've already tried hiding the overflow with overflow: hidden; but that hides the overflow for phone users as well. How can I achieve this?
Asked
Active
Viewed 101 times
-2
-
1Have a look at CSS media queries, it's very simple. It applies some CSS on large screens but not on phones, for instance – Jeremy Thille Mar 01 '21 at 14:38
-
https://stackoverflow.com/questions/10061572/responsive-layout-tutorial – Daan Seuntjens Mar 01 '21 at 16:28
-
Does this answer your question? [Responsive layout tutorial?](https://stackoverflow.com/questions/10061572/responsive-layout-tutorial) – Pejman Kheyri Mar 02 '21 at 07:59
1 Answers
0
Yes, you can use CSS media queries.
For example:
body{
overflow: hidden;
}
/* this is for mobile devices */
@media only screen and (max-width: 480px){
body{
overflow: visible;
}
}

Rev
- 29
- 6