[FIX] NavContainer: write height and width only if required and set

Change-Id: Iabb4821baf6c9d880831b167c775d7d21265236d
Merge "[FIX] NavContainer: write height and width only if required and set"