1

I'd like to create a block of text that has three lines of text, all different lengths but the same width like shown in this image (apologies for the size). I'd like to know if there is a way of doing so without creating three different elements and changing the font-size for each. Would it be possible to set the font-size to the width of its container?

Example

<div class="block pink">
<div class="block-container">
    <p>Create your</p>
    <p>30x20</p>
    <p>Canvas</p>
</div>
</div>
  • http://stackoverflow.com/questions/10292001/how-to-set-font-size-based-on-container-size – John Mar 30 '14 at 15:22

1 Answers1

1

no. Not with CSS. But there are lots of jquery plugins that will do this for you. Fx. http://simplefocus.com/flowtype/

Johansrk
  • 5,160
  • 3
  • 38
  • 37