How can the active change of an in-line div width affect the width of another in-line div? 

```
<div>
    <div></div>
    <div></div>
</div>

```

Would javascript need to be used to resize both simultaneously? or is there a more elegant way with css?

I don't believe the css calc method can be used in this case?
width: calc(X-Y);

Example:

A similar concept would be the apple.com menu, where the expansion of the search box causes the change in div width of the menu tab item area. 
(apple uses a different method which I can't work out)