adjust style when there is image