HTML CSS examples for CSS Form:input
expand input field to 100% of the parent
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .topsearch<!--from www . j a v a 2s.c o m--> { height:41px; line-height:36px; padding-right:11px; width:100%; display:table; } .topsearch label { color:Chartreuse; text-transform:uppercase; font-weight:normal; font-size:0.10em; margin:0 6px; } .topsearch label, .topsearch form { display:inline; } .topsearchfield { border:none; height:25px; font-size:16px; width:auto; } #field-topsearch { width:81%; display:inline-block; } .button-start-search submit { display:table-cell; } </style> </head> <body> <div class="topsearch"> <label for="field-topsearch">Lorem </label> <form action="https://www.etc.com/index.php?" method="get"> <input type="hidden" name="p" value="catalog"> <input type="hidden" name="mode" value="search"> <input type="hidden" name="search_in" value="all"> <span class="topsearchfield"> <input id="field-topsearch" maxlength="256" type="text" name="search_str" value=""> </span> <input type="submit" class="button-start-search submit " value="Go!"> </form> </div> </body> </html>