Forum Moderators: not2easy
/* initial */
+---+---+---+
¦ A ¦ B ¦ C ¦
¦ D ¦ E ¦ F ¦
¦ G ¦ H ¦ I ¦
+---+---+---+
/* rotated 90 */
+---+---+---+
¦ G ¦ D ¦ A ¦
¦ H ¦ E ¦ B ¦
¦ I ¦ F ¦ C ¦
+---+---+---+
/* rotated 180 */
+---+---+---+
¦ I ¦ H ¦ G ¦
¦ F ¦ E ¦ D ¦
¦ C ¦ B ¦ A ¦
+---+---+---+
/* rotated 270 */
+---+---+---+
¦ C ¦ F ¦ I ¦
¦ B ¦ E ¦ H ¦
¦ A ¦ D ¦ G ¦
+---+---+---+
the only way you might be able to do it is this... if all the cells are the same size, then you could give each one a different ID, and then position them with position:absolute. then it wouldn't matter which row they were in.
because you'd have to rewrite the underlying HTML first
Yeah, I already did that. I guess I was just hoping/wishing for some type of element rotation, kind of like rotating an image except in this case a block element where the inline elements would "stay in place" during the rotation.
Wishful thinking, I guess :)
Thanks, londrum.
+---+---+---+
¦ A1 ¦ A2 ¦ A3 ¦
¦ B1 ¦ B2 ¦ B3 ¦
¦ C1 ¦ C2 ¦ C3 ¦
+---+---+---+
So if you rotate 90 degrees
A1 content = C1 content
A2 content = B1 content
and so on....
If you have it mapped out as to which cells get moved to where you should be able to pull it off.
Then, you could change out the stylesheet using javascript. Each stylesheet would specify a width for the containing div, then all the other divs would have known height and width.
Each stylesheet would have different settings on the "top" and "left" properties depending on where you wanted the items to go.
Note that if the divs in Demaestro's post were defined as
<div class="A 1">thumb</div>
etc
The "1" col becomes your new top row when turned 90 degrees.
Let's say in all cases
div A, div B, div C {width:50px; height:100px;}
So as drawn it would be something like
div.A {top:0;}
div.B {top:101;}
div.1 {left:0;}
div.2 {left:51;}
etc
If you use an onclick event to change out the stylesheet to rotate 90, you change that to
div.1 {top:0;}
div.2 {top:101;}
div.C {left:0;}
div.B {left:51;}
I think that woould work