Fixing Width of Search Box


I am trying to fix the width of a search box. When I use different browser the search box is either to short or to long. I think the best way is to use percentages and add the search button also in percentage but the percentage on the search box has no affect. So for example search box is 80% and search button is 20%.

Does anyone have any suggestions on how to ensure a search box remains full width?

It would be easier if we could see an example. For full width, use something like width: 100% (or a bit less).