This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

how to apply css only on desktops

5 years ago · Last reply by Andrew Misplon 5 years ago

Hi everyone, i’ve set some css on my vantage theme, there is a way to aplply these css only for desktop navigation?

the css are for modify the left and right margin of the page.
all ok when visualized on desktop but when i visualize the web page on mobile devices the pages are cut on the sides, any solution?

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

1
  1. Andrew Misplon Staff 5 years, 10 months ago

    Hi Guido

    Thanks for reaching out.

    At AppearanceCustom CSS, wrap your rules in a media query using min-width.

    https://www.w3schools.com/css/css_rwd_mediaqueries.asp
    https://www.w3schools.com/css/css3_mediaqueries_ex.asp
    https://www.w3schools.com/cssref/css3_pr_mediaquery.asp

    @media (min-width: 1024px) {
        .some-rule { color: red; }
    }

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread