freeCodeCamp Challenge Guide: Make Typography Responsive

Make Typography Responsive


Hints

Hint 1

For viewport width use the vw unit.

Hint 2

For the smaller viewport measurement use the vmin unit.


Solutions

Solution 1 (Click to Show/Hide)
<style>
h2 {
      width: 80vw;
  }
  p {
      width: 75vmin;
  }
</style>

<h2>Importantus Ipsum</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus quis tempus massa. Aenean erat nisl, gravida vel vestibulum cursus, interdum sit amet lectus. Sed sit amet quam nibh. Suspendisse quis tincidunt nulla. In hac habitasse platea dictumst. Ut sit amet pretium nisl. Vivamus vel mi sem. Aenean sit amet consectetur sem. Suspendisse pretium, purus et gravida consequat, nunc ligula ultricies diam, at aliquet velit libero a dui.</p>
2 Likes