The following fiddle shows a 2x3 css table layout with 5 cells. http://jsfiddle.net/BeBum/ Now, I want cell no. 2 to be right aligned, positioned above cell no. 5. I could just add an empty cell between 1 and 2, but what if the table has a variable width and you don't know the number of cells in a row ? Could be 4 or 7. I want the no. 2 cell to always be at the utmost right position of the table. (position:absolute on .column doesn't work)
thanks for your feedback. i'm trying to make a variable grid layout , but the top row has only 2 boxes. one left and one right. the remaining rows can have different numbers of boxes, and all left aligned. come to think of it, maybe I can use table-column-group?
http://jsfiddle.net/BeBum/
Now, I want cell no. 2 to be right aligned, positioned above cell no. 5.
I could just add an empty cell between 1 and 2, but what if the table has a variable width
and you don't know the number of cells in a row ? Could be 4 or 7.
I want the no. 2 cell to always be at the utmost right position of the table.
(position:absolute on .column doesn't work)
It seems you are using a table layout and then trying to force it to something a table layout was never designed to do - I'd be intrigued to see why.
Position relative kind of works - see this CodePen - but only if you know the spacing and work it out manually so probably no good for what you want.
i'm trying to make a variable grid layout , but the top row has only 2 boxes. one left and one right.
the remaining rows can have different numbers of boxes, and all left aligned.
come to think of it, maybe I can use table-column-group?
http://jsfiddle.net/BeBum/8/
with the position:absolute I was already halfway, but never would've come up with the :first-child :last-child.
thanks.