ChadGregory Posted December 22, 2012 Share Posted December 22, 2012 I am creating a responsive website and I am coming across a strange problem with my search text box. I want the text box to span the full width parent element. Here are the css rules applied to the text box. #searchform input[type = text] { border: 0; padding: 8px 0; width: 100%; max-width: 640px; top: 0; margin:0; position: relative; } I have the view port setup correctly and every else works fine, but there is white space on the right side of the text box. After tinkering with the css properties in Chrome to get live updates using Chrome Developer Tools I stumbled across a very strange partial solution. If i disable the width: 100%; property and re-enable it the white space disappears. I reload the page and its back again. How can I fix this issue? Quote Link to comment https://forums.phpfreaks.com/topic/272281-textbox-giving-me-trouble/ Share on other sites More sharing options...
Love2c0de Posted December 23, 2012 Share Posted December 23, 2012 Can you post some more HTML and CSS or a link to a live version of the page? Regards, AoTB. Quote Link to comment https://forums.phpfreaks.com/topic/272281-textbox-giving-me-trouble/#findComment-1400947 Share on other sites More sharing options...
ChadGregory Posted December 23, 2012 Author Share Posted December 23, 2012 (edited) <form role="search" method="get" id="searchform" action="http://papillonstudios.ca"> <div> <input type="text" value="" placeholder="Search..." name="s" id="s"> <input type="submit" id="searchsubmit" value="" width="26" height="28"> </div> </form> Live Link(WIndow Width must be 640px or less) - http://papillonstudios.ca Edited December 23, 2012 by ChadGregory Quote Link to comment https://forums.phpfreaks.com/topic/272281-textbox-giving-me-trouble/#findComment-1400968 Share on other sites More sharing options...
Love2c0de Posted December 23, 2012 Share Posted December 23, 2012 Just so I'm clear, is the problem with the text box not aligning correctly with your submit button? If that is an issue, then change your top: 8px to top: 0px on your #searchform input[type=submit] element. That's the only issues I'm seeing at the moment. Regards, AoTB. Quote Link to comment https://forums.phpfreaks.com/topic/272281-textbox-giving-me-trouble/#findComment-1400970 Share on other sites More sharing options...
ChadGregory Posted December 24, 2012 Author Share Posted December 24, 2012 I viewed it again today and it just fixed itself. Quote Link to comment https://forums.phpfreaks.com/topic/272281-textbox-giving-me-trouble/#findComment-1401067 Share on other sites More sharing options...
wright67uk Posted December 31, 2012 Share Posted December 31, 2012 I viewed it again today and it just fixed itself. Could this be down to your cache being refreshed? Quote Link to comment https://forums.phpfreaks.com/topic/272281-textbox-giving-me-trouble/#findComment-1402328 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.