Using CSS, no js, how would one go about reversing the order of 2 or more words in a sentence? Example, as I intend it:
This is word1 word2.
This is word2 word1.
I wish to display the same sentence (in original authoring order) underneath the first, only maybe changing the class name for the words so that I end up with:
This is word2 word1.
My only containers so far are paras, but I'll use what I have to in order to get this effect.
Hi guys - I didn't think it was possible either, but what you provided does indeed work! You are right, of course, this much better approached with dynamic code.
And I should have been more clear, the eventual usage for this is not a web page but a generated ePub file, where I don't want to rely on any sort of scripting.
While it may be more trouble than it's worth, I did want to see if I could give CSS a workout before physically reordering words, because the words themselves will change of course but the pattern (oft repeated) will remain the same throughout the ePub book.
This is word1 word2.
This is word2 word1.
I wish to display the same sentence (in original authoring order) underneath the first, only maybe changing the class name for the words so that I end up with:
This is word2 word1.
My only containers so far are paras, but I'll use what I have to in order to get this effect.
Any ideas?
Why don't you want to use JS?
And I should have been more clear, the eventual usage for this is not a web page but a generated ePub file, where I don't want to rely on any sort of scripting.
While it may be more trouble than it's worth, I did want to see if I could give CSS a workout before physically reordering words, because the words themselves will change of course but the pattern (oft repeated) will remain the same throughout the ePub book.