When I started posting on stackoverflow I never thought I'd be asking a question about simple HTML layout, but here's my slice of humble pie for the day.
In this fiddle:
http://jsfiddle.net/cheolsoo/zd5fupje/
.main {text-align:center}
The thumbnails are centered in the page regardless of the page width, which I want, but the last (incomplete) row of thumbnails is also centered, which I don't want. I want the last row to be flush left with the other rows, with blank space on the right.
In this fiddle:
http://jsfiddle.net/cheolsoo/330z8bw1/
The last row is flush left with the other rows, with blank space on the right, which I want, but the whole batch of thumbnails is a bit left of center depending on the window width, which I don't want.
So, how can I SIMPLY have the whole batch of thumbnails perfectly centered but the bottom row flush left with the rest? I say "SIMPLY" in all-caps because the ugly, complicated solutions of (1) using a bunch of media queries for varying screen widths and (2) using JavaScript to put n dummy thumbnails at the end of the row, where n = (total number of thumbnails) % (number of thumbnails in one row) have occurred to me, but those solutions are ugly and complicated.
The number of thumbnails will vary, but I know it. I also know the width of the thumbnails. (They're all the same size.)
There must be some bit of CSS I can use that hasn't occurred to me...