How to prevent child element to move when parent dropdown?
In css you need to give your menu bar div an absolute position.

For Example: .menubar { position: absolute; } so that it overlays everything, so it won't affect anything else. 

Then adjusted if needed 

Example: .menubar { position: absolute; top: 0px; left: 20px; }

Also you will need to increase the yellow div from 50px to 70px

.yellow { margin-top: 70px; }