I am trying to make a page responsive using the media query min-width. I used the two breakpoints, @media only screen and(min-width: 320px) to display some styles, but the other rule for the other breakpoint is conflicting and overiding the other that is #media only screen and (min-width: 998px). See the code i used
@media only screen and (min-width: 320px) {
.header {
display: flex;
flex-direction: column;
height: 100px;
background-color: black;
}
.xpand {
padding-top: 30px;
}
.searchBar {
width: 25%;
}
}
@media only screen and (min-width:990px) {
.header {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;s
flex-direction: row;
-webkit-flex-direction: row;
-ms-flex-direction: row;
display: flex;
-webkt-justify-content: flex-start;
-ms-justify-content: flex-start;
justify-content: flex-start;
}
#xpand {
display: none;
}
#brand {
padding-top: 12px;
padding-left: 25px;
}
.navBar {
padding-top: 35px;
padding-left: 25px;
margin-left: 16.66666666666667%;
}
.user {
padding-top: 35px;
padding-left:25px;
padding-right: 12px;
margin-left: 20%;
cursor: pointer;
}
.searchBar {
-webkt-flex: 1;
-ms-flex: 1;
flex: 1;
padding-top: 25px;
padding-right: 25px;
margin-left: auto;
}
}
I don't know if this is the right way to use the min-width, someone should please show me a way forward.