[FORWARD PORT] LPS-50024 fix spacing between elements

This is a forward port of https://github.com/brianchandotcom/liferay-plugins-ee/pull/8750