Font-size same as element width - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Font

Description

Font-size same as element width

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">
h1 {<!--from w ww. j  a va2s.  c o m-->
   text-transform:uppercase;
   margin:0px 0px;
   font-size:19px;
   text-align:center;
   letter-spacing:.9px;
   font-size:7.5vw;
}

.container {
   width:81%;
   margin:21px;
}

div#form-wrapper {
   border:2px solid Chartreuse;
   box-sizing:border-box;
   font-size:17px;
   padding:51px;
   background:yellow;
   font-size:3.6vw;
}

div#form-wrapper input {
   display:block;
   margin:21px auto ;
   height:29px;
   border:2px solid blue;
   width:100%;
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <h1>Lorem ipsum dolor </h1> 
   <div id="form-wrapper"> 
    <form action="#" method="post"> 
     <input type="text" name="fullname" placeholder="this is a test"> 
     <input type="email" name="email" placeholder="E-mail"> 
     <input type="tel" name="tel" placeholder="Telefon"> 
     <input type="submit" value="ODESLAT"> 
    </form> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials