I know this is a bit bleeding edge, but here's the question anyway:
Given
<div id="one">First Div</div>
<div id="two">Second Div</div>
...
#one, #two { display: table-cell; }
... which gives me a lovely side-by-side arrangement of the div's with #one on the left and #two on the right.
Is there anyway to put #two on the left and #one on the right, using display: table-cell;
, and without changing the order of the divs in the HTML?
I ask, because I'd like to keep #one above #two in the HTML for SEO reasons, but I'd like #two to be to the right of #one for aesthetic reasons. I know how to do this using floats/absolute positioning/margins/etc., but I was wondering if there was a way I can do it using the newer CSS table display properties (which I much prefer).
Any thoughts?
You can (ab)use the text direction warning, evil ahead:
<div id="container">
<div id="one">First Div</div>
<div id="two">Second Div</div>
</div>
<style>
#container { direction: rtl; }
#one, #two { display: table-cell; direction: ltr;}
</style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With