I have a section on my website that I need to re-order for mobile devices. Currently, it looks one way on desktop and another way on mobile. Here's what I'm trying to achieve:
On desktop:
https://i.sstatic.net/w3lXh.pngOn mobile:
https://i.sstatic.net/TVqlY.pngI've been working on this using JSFiddle. You can see a live demo here.
@media only screen and (max-width: 480px) {
.flex-item1 {
order: 1;
}
.flex-item2 {
order: 3;
}
.flex-item3 {
order: 2;
}
}
<section id="main-content">
<div class="container">
<div class="row" id="top-content">
<div class="col-lg-4" id="left-content">
<h1 class="flex-item1"></h1>
<div class="card-custom flex-item2">
</div>
</div>
<div class="col-lg-8" id="right-content">
<div class="flex-item3" canplay id="video-block">
</div>
</div>
</div>
</div>
</section>
Can someone help me figure out what I'm doing wrong?