I have two divs that have 50% width each. I want to make it so that the the hovered div expands to 70% and the other reduces to 30%. And when the mouse moves out, they both
This should work nicely for you:
EDIT: Added animation EDIT: Added height resize to animation
Hello world!
EDIT: If you want it to fill the height of the window, just use window.innerHeight in place of the container height:
window.innerHeight
Here's a jsFiddle that demonstrates it working.