Statement: Making my website Responsive.
What I have done so far: I've tried using @media queries, making external css pages according to resolution.
Problem: I made 5 style sheets; 1024.css, 1280.css, 1366.css, 1440.css, 1920.css . All seem to work fine except the 1024.css! When I load the website in 1024 resolution it automatically turns to mobile-type site. The nav turns into a button, all the elements get dislocated.
What I'm looking for?: I want to load the css style sheets thru javascript. For e.g; I want to be able to load 1280.css when the screen's resolution is 1024px .
I'm a beginner at js. So I can't make advanced functions.
But so far I've prepared this algorithm:
If (max-width = 1024px){replace style.css with 1280.css}
If (max-width = 1366px){replace style.css with 1366.css}
If (max-width = 1440px){replace style.css with 1440.css}
If (max-width = 1920px){replace style.css with 1920.css}
Else if (max-width = 1280px){replace style.css with 1280.css}
PS:I've Searched Google and Stackoverflow and found nothing.
UPDATE: I tried what you said Abhishek Pandey but here is the result . you can check it on http://shalepizza.tk/ Im currently working on the index page.
To check the appropriate resolution, when the page is loaded, press F12 and Ctrl+Shift+M
I link my CSS like this : <link href="/static/1024.css" rel="stylesheet" type="text/css" />