I have noticed a odd behavior in using letter-spacing
and text-align: center
together. Increasing the space, bring the text to be closer to the left margin of the element.
div {
width: 400px;
height: 200px;
background-color: #3b0d3b;
text-align: center;
margin: auto;
}
p {
color: #fff;
margin-top: 40px;
text-align: center;
padding-top: 10px;
font-size: 1.2em;
}
.spacing {
letter-spacing:.4em; /* This property is the problem */
}
.spacing-large {
letter-spacing:.9em; /* This property is the problem */
}
<div>
<p>- Foo Bar Zan -</p>
<p class="spacing">- Foo Bar Zan -</p>
<p class="spacing-large">- Foo Bar Zan -</p>
</div>
I spot the same behavior on last Firefox and Chrome. Is there a way to fix this issue?