Setting different input widths while using type=number for mobile - HTML CSS CSS Form

HTML CSS examples for CSS Form:input

Description

Setting different input widths while using type=number for mobile

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">
input[type="number"].first {
   width:51px;
}

.second {<!--   ww w  .  j av  a  2 s .  c  o m-->
   width:100px;
}
</style> 
 </head> 
 <body> 
  <input type="number" class="first"> 
  <input type="number" class="second">  
 </body>
</html>

Related Tutorials