These are 3 inline-block
and elements which means that they will be ordered next to each other.
Here is a fiddle to view everything live: https://jsfiddle.net/8mdm8eox/
.wrapper {
background: #fff;
width: 100%
}
.firstElement,
.secondElement,
.thirdElement {
display: inline-block;
width: calc(100%/3)
}
.firstElement {
background: #000;
color: #fff
}
.secondElement {
background: grey
}
.thirdElement {
background: #ddd
}
@media (max-width: 767px) {}
<div class="wrapper">
<div class="firstElement">First Element</div>
<div class="secondElement">Second Element</div>
<div class="thirdElement">Third Element</div>
</div>
So here is what I want , I want when the screen width is 767px or less:
@media (max-width: 767px){}
The first two elements are ordered vertically and the third one is ordered horizontally with the two other elements, So that they become like:
_______________ ________________
|First Element| |ٍ |
_______________ | |
|Third Element |
________________ | |
|Second Element| | |
_________________ _______________
Don't worry about the third element , The text will be broken , I just want the first two elements to look like that without changing the html.