Do you need to set the width of ysearchmod? I see you have the width of ysearchautocomplete2 to 40%, but what is it 40% of? 40% of the width of the parent container ysearchmod? That's why I'm wondering if ysearchmod needs to have a width set, so that ysearchautocomplete2 knows what it needs to be 40% of.
That is a very good point. Just changed the code but still the same problem with the search icon. I wonder if it needs css to positon it? I thought by default it should align next to the inputbox?