• Hi,

    I’d like to set an image visible only by mobile, I’ve done some research and found just how to hide the elements by mobile and I managed to implement it.

    However, I can’t do the opposite.

    How can I do?

    Thanks for your help

Viewing 3 replies - 1 through 3 (of 3 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Do you have the image on the page already?

    You would need to use CSS media queries.

    @media only screen and (min-width: 768px) {
      #imageId {
         display: none;
      }
    }

    768px is the breakpoint for mobiles, so if the screen width becomes greater than 768px, that image will get hidden immediately.

    • This reply was modified 7 years, 6 months ago by umairkhan94.
    Thread Starter anancuras

    (@anancuras)

    Thank you very much

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Set an image visible only by mobile’ is closed to new replies.