So I code a CSS from Mobile Version first. After that I modify it to the larger screen.
When I do the larger screen, it’s affect the smaller screen view, even I’ve set the value for smaller screen view.
CSS structure:
.m-dwSeotSecondSection__featureGroup {
text-align: center;
width: 80%;
margin: 4em 0 4em 0;
}
@media only screen and (min-width:800px){
.m-dwSeotSecondSection__featureGroup {
width: 22.5%; }
}
The HTML structure:
<div class= "m-dwSeotSecondSection__fgContainer">
<div class="m-dwSeotSecondSection__featureGroup -seo">
<div class="a-dwSeotSecondSection__icon -seo">
</div>
<div class="a-dwSeotHeading -heightdefined">
</div>
<p class="a-dwSeotDesc">
</p>
</div>
</div>
4
Answers
It was answered by @Anuresh and @vuskovic09 I forgot to add
I am not sure if you want to default to the initial styles. If so, then maybe this will work:
I think Media query will help you like
if you want to effect the given css in some specific screen then give media query like this
now this css will only effect on greater then 767px width and less then 1200px width device. so it will not effect to other style
The CSS looks just fine, just check in your HTML head section if you have the following line: