What size of screen for CSS to consider as desktop?

3

I want to use this code only when desktop . What size for the average query?

overflow-y: hidden; // hide vertical
overflow-x: hidden; // hide horizontal
    
asked by anonymous 01.12.2017 / 17:23

2 answers

2

I like to follow the pattern of Bootstrap , because I find it well defined. For desktop you should use Large and Extra Large

  

Extra small

01.12.2017 / 17:36
1

Good practice. When you build the site think of the Mobile Frist. This means that you should start your Media Queries by min-width

One of the thoughts of this technique is that when someone accesses a site by mobile device the connection is probably worse than when you access the desktop. Soon the first Media Queries to be loaded should be the smaller ones, and then the CSS of the larger screens. So always start with the small screens. Then the bigger ones.

In the case of your question I would make a Media Queries like this:

<link rel="stylesheet" media="(min-width: 1024px)" href="desktop.css" />

Then only when the screen is larger than 1024px will it draw the CSS from the desktop

Then in that%% of you place your class

.classe {
    overflow-y: hidden; // hide vertical
    overflow-x: hidden; // hide horizontal
}

This link has several considerations: link

    
01.12.2017 / 17:58