For styling, Mendix recommends to use the sass. The scss files can be found in the <project>/themes/styles/sass/custom folder. Use classes in the model when needed, but do not use inline styling.
Noncompliant solution:
Compliant solution:
See this forum post for more information on how to style mendix using sass:
https://forum.mendixcloud.com/link/questions/92855