Quantity Ordering With CSS
Here is your mission, should you choose to accept it: create a table of items. Each item should span a third of the content area, with the fourth item starting on a new row, much like floats. However, a particular item must always display the price at the end of the first row.

So if there are only two elements, the price element would be second. But if there are more than three items, the price would be the last element in the first row. You might assume that JavaScript would be the best solution — just loop over the items, and if there are more than three, update the styling. But what if I told you could do it with CSS alone?
The post Quantity Ordering With CSS appeared first on Smashing Magazine.
LEAVE A REPLY
You must be logged in to post a comment.