The problem I'm having is filling a div
with text using letter-spacing
. The main issue is, I don't know the width of the div
.
First I was thinking using, text-align= justify
, but since that I've been running in the dark and got no clue to how to solve this. I'm guessing some scripting magic might do the trick.
An imgur link giving you an idea what I mean:
<div id="container">
<h1>Sample</h1>
<p>Another even longer sample text</p>
</div>
Here is a link showcasing an example; JSfiddle.
letter-spacing
anymore. It's more liketext-align
being something towardsjustify
.letter-spacing
does not mind the text it's surroundings. Text-alignment does. It is a good question tho :) – Antiicerspan
s will always abide by the renderedwidth
of each letter, no matter what font or size you use. If you have concrete input I'm happy to fill in on that too :) – Antiicer