Fix resizing of workspace to conform to parent element and have max widt...

...h.