I wonder if it is possible to rearrange HTML table cells using only CSS.
For example can this
------------------------------------------------
| A | B | C |
------------------------------------------------
be displayed as:
------------------------------------------------
| C | A | B |
------------------------------------------------
or perhaps even this:
-------------------------
| A |
-------------------------
| B | C |
-------------------------
Is this possible with CSS only or is it necessary to modify the HTML nodes?
EDIT: Some of you were wondering why this is needed at all, so here’s the real-life problem I’m facing:
I want to display a list of issues reported by users:
------------------------------------------------------------------------------
| Problem description (A) | Reporting user (B) | Link to affected entity (C) |
------------------------------------------------------------------------------
I wanted to evaluate various layouts. The first layout variant would emphasize the reporting user, the second one would emphasize the text description.
I don’t have any problem in changing the structure, and in fact I already did, but as I was coding this, I wondered if it is possible to do with CSS. (Just pure curiosity)
You can, but it’s not the best thing to do though (see other answers).
Here’s my example:
View on JSFiddle