Reputation: 39681
I want to use the following character in a page:
<div>▼</div>
(it's a down arrow character). Is there a way to change its size? I'm not even sure how its initial size is determined anyway - can we apply a font size to it? Or is there some css scale attribute we can apply to it?
Or can I specify its exact width/height in pixels?
Thank you
Upvotes: 3
Views: 10324
Reputation: 201568
The size of the character is determined by the font family and the font size. Both of them can be set as usual in CSS, with the font-family
and font-size
properties (or even using old-fashioned HTML font
tag). Setting font-size
different from other text on the same line tends to cause uneven line spacing, but this does not matter if you are using the character in a block of its own, as the div
markup suggests.
The character denoted by ▼
is not an arrow but U+25BC BLACK DOWN-POINTING TRIANGLE “▼”. Its relative size (relative to font size) varies a lot by font family, so you should primarily consider the font family choice, using a reasonable list of font families (with comparable size for this character), and only if needed consider font size too.
Upvotes: 2
Reputation: 39698
Just like any other font is controlled
<div style="font-size:x-large">▼</div>
Upvotes: 1
Reputation: 4337
The same way you control the size of any other character. Just set the font size.
Upvotes: 0
Reputation: 3996
You can use CSS to control it just like any other text.
https://developer.mozilla.org/en-US/docs/CSS/font-size
Upvotes: 6