I am trying to create a token inside inside a circle using CSS. It should look like & copy; mostly.
Here is what I still have .
a::before { content: '?'; font-size: 60%; font-family: sans-serif; vertical-align: middle; font-weight: bold; text-align: center; display: inline-block; width: 1.8ex; height: 1.8ex; border-radius: 1ex; color: blue; background: white; border: thin solid blue; }
This is not bad for firefox, but the location of the question mark inside the circle is off-center in Chrome (and I don't have IE for testing, but I assume the worst).
I do not really understand the nuances of fonts. Is it possible to make such an approach for working on a cross-platform platform, or should I refuse to use an image? I do this to save it with a font.
UPDATE: customizing the settings proposed so far provides only improvements in certain circumstances. It seems that there are some font sizes for which there is more than a rounded error (more than 1 pixel) of off-centerness, either horizontally or vertically. The goal is to attach a border to the question mark, and not match the border of the square box containing the question mark, as I suspect is happening.
html css
spraff
source share