1
Guys, next.
I already own 4 CSS that make the necessary adjustments on my website. (unfortunately I started from biggest to smallest since I didn’t know it was good to have started from mobile).
My website will need:
- A css that appears from from 1200px to any screen larger than this;
- A css that appears down below from 1200px to 1024px (I will go down)
- A css that appears down below from 1024px to 883px.
And now I’m creating a new css, which I will use below this 883px. However, when I put this code in my css, a smaller css comes together with a larger css and the two stay on the page, messing everything up. How do I use 1 css at a time in each area I specify?
<link rel="stylesheet" type="text/css" media="only screen and (max-width: 883px)" href="css/minsmall.css">
<link rel="stylesheet" type="text/css" media="only screen and (max-width: 1023px)" href="css/small.css">
<link rel="stylesheet" type="text/css" media="only screen and (min-width: 1024px)" href="css/medium.css">
<link rel="stylesheet" type="text/css" media="only screen and (min-width: 1200px)" href="css/large.css">
Another question: In an example I saw that the guy used on media=" screen and [...] instead of only screen [...], what’s the difference of using only or leaving without only? "
From what I understand, the browser can interpret for example that the maximum size of up to 1024 px has 3 css that could be used. Can’t you put a min-width before max? So would more precise ranges...
– DiegoSantos
so I don’t know how it would look, I could make an example of some of the code of how it would look?
– Lukas Monteiro
I answered below to make it easier
– DiegoSantos