css - HTML automatically resize button and font size for phones in a form box -
so i'm still trying hang of html , css, want needs different approach.
so right when view website on phone form auto resize, button doesn't.
however can see code, have both button , font size pretty big. way automatically resize button , font size fit when viewed on phone , tablet.
below css code button.
thanks
<form> <input type="email" name="email" id="email" class="field-style field-split align-left set-width" placeholder="your email" /> </br> </br> <btn> <input type="submit" name="subscribe" value="get free course now" id="submit" /> </btn> </form> .form-style-9 btn input[type="button"], .form-style-9 btn input[type="submit"] { background: #3cd934; background-image: -webkit-linear-gradient(top, #3cd934, #2b8016); background-image: -moz-linear-gradient(top, #3cd934, #2b8016); background-image: -ms-linear-gradient(top, #3cd934, #2b8016); background-image: -o-linear-gradient(top, #3cd934, #2b8016); background-image: linear-gradient(to bottom, #3cd934, #2b8016); -webkit-border-radius: 4; -moz-border-radius: 4; border-radius: 4px; -webkit-box-shadow: 0px 1px 3px #666666; -moz-box-shadow: 0px 1px 3px #666666; box-shadow: 0px 1px 3px #666666; font-family: arial; color: #ffffff; font-size: 27px; padding: 11px 20px 10px 20px; text-decoration: none; } .form-style-9 btn input[type="button"]:hover, .form-style-9 btn input[type="submit"]:hover { background: #256e13; background-image: -webkit-linear-gradient(top, #256e13, #1d520f); background-image: -moz-linear-gradient(top, #256e13, #1d520f); background-image: -ms-linear-gradient(top, #256e13, #1d520f); background-image: -o-linear-gradient(top, #256e13, #1d520f); background-image: linear-gradient(to bottom, #256e13, #1d520f); text-decoration: none; }
you can use media queries
@media (max-width: 300px) { btn { width: 50px; font-size:10px; } } the above saying if screen size <= 300px apply these rules.
Comments
Post a Comment