maincontainer{
width: 100%;
float: right;
}
.first{
float: left;
width:50%;
background-color: antiquewhite;
min-height: 20%;
text-align: center;
font-family: cursive;
font-size:24px;
}
.second{
float: right;
width: 50%;
background-color: aqua;
min-height: 20%;
text-align: center;
font-family: cursive;
font-size:24px;
}
I want the side bar content div to move up and side bar div to move down when i resize my screen to 480 px
@media all and (min-width:320px) and (max-width:480px) {
.first{
width: 100%;
float: right !important;
}
.second{
width: 100%;
float: left !important;
}
}
<div id="maincontainer">
<div class="first">Side Bar </div>
<div class="Second">Side Bar Content </div>
</div>