Create responsive Button size - HTML CSS CSS Form

HTML CSS examples for CSS Form:input button layout

Description

Create responsive Button size

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">

@media screen and (max-width: 1024px)
{
   #homebutton input[type=image] {
      position:absolute;
      left:0%;
      top:0%;
      margin: 0px;
      height:50px;
   }<!-- w  w w  .j  av a  2  s. c om-->
}
/*Media Query*/
@media only screen and (min-device-width: 768px) and (orientation: portrait),
screen and (max-width: 994px)
{
   #homebutton input[type=image] {
      position: absolute;
      left: 0%;
      top: 0%;
      margin: 0px;
      height: 700px;
   }
}
@media screen and (max-width: 555px),
screen and (max-device-width: 480px) {
   #homebutton input[type=image] {
      position: absolute;
      left: 0%;
      top: 0%;
      margin: 0px;
      height: 50px;
   }
}
@media screen and (max-width: 320px) {
   #homebutton input[type=image] {
      position: absolute;
      left: 0%;
      top: 0%;
      margin: 0px;
      height: 50px;
   }
}


      </style> 
 </head> 
 <body> 
  <div id="homebutton"> 
   <input type="image"> 
  </div>  
 </body>
</html>

Related Tutorials