I have two columns on my page:
Left-Column Right-Column
On mobile and tablet devices, I want the Right-Column to display before the left one. For e.g.:
<p>Right-Column</p>
<p>Left-Column</p>
Anyone how to do this using CSS? I know I can do it using Bootstrap but the wordpress template is not designed using Bootstrap.
Thanks
If you don’t care about browser support you can use
flexbox
for this.http://jsfiddle.net/scdvL0Ly/
This should work in all major browsers and in IE10 and up. See CanIuse.
Some Browsers still require prefixes for this feature.
I would use flex-box and a media query:
You question is not so clear.
But in the light of the present knowledge , keep
float:right
for Left-Column andfloat:left
for Right-Column .See the demo:
http://jsfiddle.net/srmpx6Lp/2/
If you give your code , i can better understand the need
Not very difficult, just play with the positioning in media queries opposite to the width of the other element:
Example
In case of
<table>
you can also usedirection: rtl
for parent anddirection: ltr
to child elements.