I have a simple section for which I want to re-order the elements in mobile.
In desktop, it looks like this:
I want it to look like this in mobile:
Here is what i have tried so far : JSFiddle live demo
@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>
What am I doing wrong?