Can I stretch text using CSS?

Yes, you can actually with CSS 2D Transforms. This is supported in almost all modern browsers, including IE9+. Here’s an example.

Actual HTML/CSS Stretch Example

HTML

<p>I feel like <span class="stretch">stretching</span>.</p>

CSS

span.stretch {
    display:inline-block;
    -webkit-transform:scale(2,1); /* Safari and Chrome */
    -moz-transform:scale(2,1); /* Firefox */
    -ms-transform:scale(2,1); /* IE 9 */
    -o-transform:scale(2,1); /* Opera */
    transform:scale(2,1); /* W3C */
}

TIP: You may need to add margin to your stretched text to prevent text collisions.

Leave a Comment