2013-03-03 13:48, Osmo Saarikumpu wrote:
> On 2.3.2013 22:01, Eli the Bearded wrote:
>> Is there a way to take that design and mirror the columns with just
>> a few lines of CSS? Make the logo and subpages be on the right,
>> jobs and validator boxes be on the left?
>
> At least one (not tested) CSS way comes to mind:
>
> 1) use display table* to layout the columns and
> 2) add to the container:
>
> direction:rtl;
That's the CSS counterpart of my (slightly provocative) suggestion of
using <table> (which actually works in a more cross-browser way, since
it does not require support to display: table and friends, but might
make you flamed and anathematized).
Tested with this:
<!doctype html>
<title>rtl demo</title>
<style>
body { direction: rtl; }
.main { display: table; }
.main > div { display: table-cell; }
div { border: solid 1px; }
</style>
<div class=main>
<div>First<br> column</div>
<div>Second<br>column</div>
<div>Third<br>column</div>
</div>
This also makes the content start from the right edge of body, which is
all right for right-to-left languages.
On the other hand, since writing direction is not just an optional
presentational suggestion but an inherent feature of some writing
systems, I think it should be declared in HTML, with <html dir=rtl>,
rather than in CSS.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/