html - Element in middle of Stack on Mobile, Popped out to it's own column on Desktop -


so i've got mobile query based solution already, example below show, wondering if there more 'interesting' solution. i've started using flexbox , have fallen in love how changes ways code curious there more flex or grid can accomplish following in more 'intuitive' way.

note (for client, aren't going use grid, wouldn't mind seeing proposed solution if you've got them!)

.left {    width: 100%;    div {      height: 150px;      display: block;    }    .first {      background-color: green;    }    .mobile {      background-color: pink;    }    .last {      background-color: blue;    }  }    .right {    .desktop {      display: none;      height: 150px;      background-color: pink;    }  }    @media screen , (min-width: 600px) {    .wrapper {      width: 100%;      .left {        width: 50%;        display: inline-block;        div {          height: 150px;          display: block;        }        .first {          background-color: green;        }        .mobile {          background-color: pink;          display: none;        }        .last {          background-color: blue;        }      }      .right {        width: 50%;        display: inline-block;        float: right;        .desktop {          display: block;          height: 300px;          background-color: pink;        }      }    }  }
<div class="wrapper">    <div class="left">      <div class="first">        first element      </div>      <div class="mobile">        middle element      </div>      <div class="last">        last element      </div>    </div>    <div class="right">      <div class="desktop">        middle element      </div>    </div>  </div>

https://jsfiddle.net/lt0cv56a/


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -