By using HTML and CSS only, I would like to make a row of text (single-letter) elements where each letter is both vertically and horizontally centered on a square colored background. Something like this:
I tried with: http://jsfiddle.net/63PQa/, but the background is not a square and positioning of the letter seems to be slightly off the center vertically even with vertical-align: middle
.
In addition, I am wrapping this row of elements within a div, and this div is used inside (CSS or HTML) table, so there can't be any funky margin stuff which may affect its vertical centering inside a cell.
I only need to support major modern browsers, e.g. FF, Chrome, Safari 5+, Opera 11+ and IE 9+