Change the font-size based on its original value by changing the browser width with responsive - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Change the font-size based on its original value by changing the browser width with responsive

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style>
body {<!--   www. j a  v  a 2  s . c o  m-->
   background:Chartreuse;
   color:yellow;
}

.container {
   font-size:41px;
}

.font {
   font-size:100%;
}

@media (min-width: 400px) and (max-width: 800px)  {
   .font {
      font-size:201%;
   }

}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <div class="font">
     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ullamcorper molestie lacus sed fermentum. Aliquam erat volutpat. Vestibulum tortor neque, ornare vitae tempor hendrerit, luctus at neque. Phasellus sed quam pharetra, tincidunt t 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials