Different look in desktop, how to setup

You could also use media queries. On screens smaller than 600px width the image will be width 100%. On screens larger than 600px width the image width is auto meaning the size of the image. You might want to tweak that 600px for your project.

.container {
  position: relative;
  margin-top: 10px;

img {
  width: 100%;
  height: auto;

@media screen and (min-width: 600px) {
  img {
    width: auto;
<div class="container" style="cursor:pointer;" onclick="clickToShow();">
  <img src="https://cdn.pixabay.com/photo/2018/08/14/05/17/crow-3604685_960_720.jpg" alt="Norway">

Browse More Popular Posts

Leave a Comment