Melda S
Melda S

Reputation: 141

CSS stylesheet : @Media setting in between 768px-992px

On my responsive Opencart site, when resizing our page between the widths 768px and 992px our logo pushes down and doesn't align.

I can fix this by making the top margin -23px. This of course breaks it out of this range.

Can you set a media screen range in CSS so a setting is applied between 768px and 992px only?

Our default CSS code #logo { margin: -30px 0 -2px -30px;

Upvotes: 1

Views: 3005

Answers (3)

Ivin Raj
Ivin Raj

Reputation: 3429

you can try this one:

@media screen (min-width: 768px) and (max-width: 992px){
    #logo { 
        margin: -30px 0 -2px -30px;
    }
}

Upvotes: 0

Amit singh
Amit singh

Reputation: 2036

Just add this..

@media screen (min-width: 768px) and (max-width: 992px) {
  #logo { 
   // Margin value here
 }
}

Upvotes: 0

Popmatik
Popmatik

Reputation: 107

You can indeed!

@media screen (min-width: 768px) and (max-width: 992px){
    #logo { 
       // margin code here
    }
}

Upvotes: 5

Related Questions