Is there anyway to make letters closer together using CSS? I know we can adjust line-height but I didn't know if there is anything that squeeze a font closer together.
To create a CSS bold text effect, you must use the font-weight property. The font-weight property determines the “weight” of a font, or how bold that font appears. You can use keywords or numeric values to instruct CSS on how bold a piece of text should be.
CSS Code: In this code fisr we design the div element using basic CSS properties and then to create the shrink effect we use the nth-child() Selector and set the letter spacing to -1em when we hover over the text. Final Code: It is the combination of the above two code sections.
Every browser with support for the text-rendering property. Assume every browser smooths fonts, setting text-rendering to geometricPrecision would disable the font smoothing to make the glyphs as precise as possible thereby disabling all font-smoothing and making corners, etc. sharper.
You are looking for letter-spacing
#id { letter-spacing: -1px; }
Reference
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