HTML CSS examples for CSS Layout:Position
change position of input field when focused on
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> input {<!--from ww w. ja v a 2 s . c o m--> width:100%; top:301px; position:relative; transition:.5s all; } input:focus { top:0; } </style> </head> <body> <div class="wrapper"> <p>Lorem ipsum d</p> </div> <input type="text" class="bla" placeholder="put some text here"> </body> </html>