fix resizing
now compatible with ie8, chrome, ff, opera and safari