Reputation: 1521
I have this line in CSS:
icons span{
width: 25px;
height: 25px;
margin-left: -3px;
and then
@media (min-width: 1200px){
.icons span{
margin-left: 6px;
}
Now I would like to set margin-left:6px again for width 991px and under? How do I do that in this example?
Upvotes: 1
Views: 76
Reputation: 35963
You could add more media to your css.
try to add this after your media
@media (max-width: 991px){
.os-icons span{
margin-left: 6px;
}
If you wanna use an OR condition you ca use a comma separator to specify that like this:
@media (min-width: 1200px), (max-width: 991px){
.os-icons span{
margin-left: 6px;
}
}
Upvotes: 2
Reputation: 252
i am not sure if i understand that right. You want 6px margin left up to 991px and than -3px up to 1200px and than the 6px again? If so i wold do it like the following CSS.
.icons span {
width: 25px;
height: 25px;
margin-left: 6px;
}
@media (min-width: 991px) {
.icons span {
margin-left: -3px;
}
}
@media (min-width: 1200px){
.icons span{
margin-left: 6px;
}
}
or short:
@media (min-width: 991px) and (max-width: 1200px) {
.icons span{
margin-left: -3px;
}
}
EDIT:
I did a Demo for You. Check out the fiddle
Upvotes: 0
Reputation: 28137
You can separate rules with ,
.
@media (min-width: 1200px), (min-width: 991px){
.icons span{
margin-left: 6px;
}
}
Upvotes: 0