Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to vertically centre align * (star) in label or button

alignment problem of *

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...) ?

like image 867
RajuBhai Rocker Avatar asked Jan 20 '16 11:01

RajuBhai Rocker


People also ask

How do you vertically align labels?

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.

How do I center text vertically in a button?

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!


1 Answers

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).

like image 76
Rob Napier Avatar answered Sep 22 '22 18:09

Rob Napier