I tried centre aligning symbol star(*) in a custom button but I couldn't.
How to vertically centre align just like other characters(1,2...) ?
How to center text vertically in a regular label control. The CSS tag vertical-align does not work but there is a work-around of sorts...for some reason padding-top seems to work. So you can set a value for the padding-top and then adjust the height of your label to get the text where you want it to be.
Use line-height to center it vertically. I usually use the same value as its height. Works only when you know the height. I set height to 0 and line-height to zero and this worked!
Just use a different character. Rather than * (ASTERISK U+002A) there are many other options that are similar and centered:
U+2217 ASTERISK OPERATOR ∗ (this is centered in some fonts, but not others)
U+273B TEARDROP-SPOKED ASTERISK ✻
U+FE61 SMALL ASTERISK ﹡
U+FF0A FULLWIDTH ASTERISK *
U+2735 EIGHT POINTED PINWHEEL STAR ✵
U+2736 SIX POINTED BLACK STAR ✶
FileFormat.info gives my favorite search interface. But you can also just pull up the character viewer (^⌘Space).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With