Taking a quick look at how Apple did this, it looks like their big step is this (I could be wrong - I'm in a hurry):
#globalheader #globalnav li { display: table-cell; width: 100%; overflow: hidden; }
This is a rather unusual CSS rendering value and clever of them, making <li>
work like <td>
. This means that changing the width of one of the βcellsβ causes the others in the same βrowβ to adjust how much space they take out.
Long time (fake) tabular layout!
So, assuming CSS is possible for you, and I'm not from the base with a quick look at their code, your only task is to animate the width of the search box - the rest should follow suit.
source share