styling to do css transitions correctly