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.

Reduce margins on articles (mobile only)

Resolved 7 replies premiumthemetheme-vantage
11 years ago · Last reply by Andrew Misplon 11 years ago

Hello, I would like to reduce margins of articles text, but only on mobile devices, so that the article on mobile almost takes full width of the device. Specifically, a margin-left: -20px; margin-right: -20px; would do, but how do i add that code to mobile devices only?

URL: https://degeneratione.it

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

Need fast email support? Get SiteOrigin Premium

Replies

7
  1. Andrew Misplon Staff 11 years, 1 month ago

    Hi n3d1117

    Shooting from the hip here but most likely something like this:

    @media (max-width: 680px) {
    .single #main {
    padding-right: 5px;
    padding-left: 5px;
    }

    Add the above to Appearance > Custom CSS and edit as required.

  2. n3d1117 11 years, 1 month ago

    Thank you! It worked straight away. How do I extend that to blog page too?

  3. Andrew Misplon Staff 11 years, 1 month ago

    Super, glad that helped.

    Including blog and archive should look something like this:

    @media (max-width: 680px) {
    .blog #main, .archive #main, .single #main {
    padding-right: 5px;
    padding-left: 5px;
    }
  4. n3d1117 11 years, 1 month ago

    Thanks! That worked too. Last question: how to extend that to every single page in the site? (While keeping meta slider in home page full width)

  5. Andrew Misplon Staff 11 years, 1 month ago

    For that you can just say:

    @media (max-width: 680px) {
    #main {
    padding-right: 5px;
    padding-left: 5px;
    }

    Meta Slider comes before #main.

  6. n3d1117 11 years, 1 month ago

    Much love for you Andrew <3

  7. Andrew Misplon Staff 11 years, 1 month ago

    Super, glad that helped :)

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