Fix card flipping bug when working with pages

This should fix the browser specific bug when clicking the gear icon for a page or creating a new page. Also fixes the bug where the gear overlaps the Cancel link on the back of the card. 

https://www.pivotaltracker.com/story/show/79401064

Paired with @mmitchellg5 on this. 
Minus this PHP style, indention...