I have h1. I want to fit the entire width of the viewport, consisting of 13 characters in a monospace font. After reading a CSS-Tricks article in typography the size of a viewport seems logical, if I want to achieve this, I just need to set the h1 styles to:
h1 {
font-size: 13vw;
font-family: monospace;
}
This, however, is rendering with a little space left (select the text to see the space):
(There will be an image here, but I miss the replica, so click here for JSFiddle)
I tried other sizes, a font-size: 14vw;little too big, font-size: 13.99vw;it seems right, but is it weird font-size: 13.999vw;still too big?
Can someone explain what is going on here? Why does each character string 13 characters long in a monospace font require more (100/13)% of the width of the viewport to fit the entire width of the viewport?
source
share