Make a responsive design so H2 get its maximum font size in a 1-line DIV - HTML CSS CSS Property

HTML CSS examples for CSS Property:font-size

Description

Make a responsive design so H2 get its maximum font size in a 1-line DIV

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
h2 {<!-- www.ja  va 2s .co m-->
   white-space:nowrap;
   font-size:4vw;
}
</style> 
 </head> 
 <body> 
  <h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamco</h2>  
 </body>
</html>

Related Tutorials