I have the following ul
, which produces a square bullet that (without modification) is very slightly larger than the default square bullets in HTML.
li:before {
content: "\25a0";
margin-right: 6px;
color: blue;
}
Problems:
Any clues on how to fix this?
To add a Unicode character to the CSS content property, you can do either of the following: Add a Unicode character directly, or; Use the Character's Hexadecimal Unicode Code Point Value.
The unicode-range CSS descriptor sets the specific range of characters to be used from a font defined by @font-face and made available for use on the current page. If the page doesn't use any character in this range, the font is not downloaded; if it uses at least one, the whole font is downloaded.
You can adjust its size with font-size and font-stretch (although it has limited support). Keep in mind that the width will vary with the font family too. (Be careful not to use a greater than symbol when you actually want an arrow.)
To insert a Unicode character, type the character code, press ALT, and then press X.
Please note that at least your fiddle behaves totally different across browsers !
You did not specify a font-family for the Unicode part. In the fiddle many Unicode characters will appear larger in Firefox, IE and Edge. Probably in all non-webkit browsers.
Add e.g.
font-family: "Lucida Sans Unicode", "Arial Unicode MS";
everywhere you want to use Unicode characters crossbrowser ...
You can read more about the differences in detail here: https://www.smashingmagazine.com/2014/05/unicode-for-a-multi-device-world/
You need to add the below CSS properties to li:before
font-size: 128px;
vertical-align: middle;
You can change the 128px
to any size you want.
Demo
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