I'm building a website but I have a problem. I've searched on the web for hours but found no answer.
Initially - during the last phase of query responsive media - I've made a single and unique .css and inside I've divided the categories of resolutions using @media only screen and (...) {} etc. But I had to discard this way because some things overlap. For example, although I was in a resolution 1900px width, the browser was going to take the rules of a lower resolution.
So, I decided to separate the .css files according to the resolution (some css relate to the range of resolutions, others are specific resolutions). So, once created the css files, I've added this in the of html document:
<!-- Custom CSS -->
<link href="/css/style.css" rel="stylesheet">
<!-- @MEDIA QUERY CSS -->
<link rel="stylesheet" media="screen and (min-device-width: 320px) and (max-device-width: 480px)" href="/css/media/320-480.css" />
<link rel="stylesheet" media="screen and (device-width: 480px) and (device-height: 320px)" href="/css/media/480-320.css" />
<link rel="stylesheet" media="screen and (min-device-width: 768px) and (max-device-width: 1024px)" href="/css/media/768-1024.css" />
<link rel="stylesheet" media="screen and (device-width: 1024px) and (device-height: 768px)" href="/css/media/1024-768.css" />
<link rel="stylesheet" media="screen and (device-width: 1024px) and (device-height: 600px)" href="/css/media/1024-600.css" />
<link rel="stylesheet" media="screen and (min-device-width: 1025px)" href="/css/media/1025.css" />
<link rel="stylesheet" media="screen and (min-device-width: 1680px)" href="/css/media/1680.css" />
<link rel="stylesheet" media="screen and (device-width: 1200px)" href="/css/media/1200.css" />
<link rel="stylesheet" media="screen and (device-width: 1152px)" href="/css/media/1152.css" />
<link rel="stylesheet" media="screen and (device-width: 1280px) and (device-height: 1024px)" href="/css/media/1280-1024.css" />
<link rel="stylesheet" media="screen and (min-device-width: 481px) and (max-device-width:767px)" href="/css/media/481-767.css" />
<link rel="stylesheet" media="screen and (device-width: 568px) and (device-height: 320px)" href="/css/media/568-320.css" />
<link rel="stylesheet" media="screen and (device-width: 375px) and (device-height: 667px)" href="/css/media/375-667.css" />
<link rel="stylesheet" media="screen and (device-width: 667px) and (device-height: 375px)" href="/css/media/667-375.css" />
<link rel="stylesheet" media="screen and (device-width: 414px) and (device-height: 736px)" href="/css/media/414-736.css" />
<link rel="stylesheet" media="screen and (device-width: 736px) and (device-height: 414px)" href="/css/media/736-414.css" />
<link rel="stylesheet" media="screen and (device-width: 360px) and (device-height: 640px)" href="/css/media/360-640.css" />
<link rel="stylesheet" media="screen and (device-width: 640px) and (device-height: 360px)" href="/css/media/640-360.css" />
<!-- Bootstrap -->
<link href="/css/bootstrap.min.css" rel="stylesheet">
<link href="/css/bootstrap-theme.min.css" rel="stylesheet">
Trying to change the viewport in Firefox, all worked fine. So, I continued publishing on Altervista to see the result on the network. But, at this point, nor in the smartphone, nor the computer, nor changing the viewport, I get the desired result.
Analyzing the published page via Firefox, the only css file that is recognized is that of the bootstrap css. But, for example, in that file there aren't anything about the resolution of 320px - and yet it is as if he ignore my 320-480.css file.
At first I thought it was an error of relative URLs, but it doesn't.
I can not get out. Someone would know help me? Thank you in advance.