I'开发者_开发百科d like to design a horizontal line of tiles. Ideally I'd like something like this:
http://jsfiddle.net/GolezTrol/BDb5K/ found in another post by GolezTrol.
But centered. I have a lot of trouble centering elements, and these have been no exception. What is the best way to center (and space out) a structure like this?
EDIT: this is what I want - http://i.imgur.com/5DIOk.png
One way would be to give the #container
element a fixed width and then apply this style:
margin: 0 auto;
That will work for horizontal alignment, if you're after vertical alignment as well take a look at this page which has a working example for most (if not all) browsers.
If you don't have a "religious" objection to tables, they may be your best solution.
精彩评论