
Published:July 15, 2026
Time to read:4 min
CSS Tricks for Dynamics CRM Form Elements
A Short Overview of the Guide
A Short Reference About the Author
Introduction
Practical Considerations When Applying Custom CSS in Dynamics 365
Applying Custom CSS to Dynamics CRM Forms
Examples of Using CSS in Subgrids
Prettify Form Elements
Conclusion
Frequently Asked Questions
Microsoft Dynamics 365 CRM does not provide a direct option to add custom CSS to forms. To apply styling changes, you need to create a JavaScript web resource that loads either an external CSS file or inline CSS and then attach it to the form’s OnLoad event.
Custom CSS through JavaScript web resources is a customization approach that can modify the appearance of CRM forms. However, since it relies on the underlying HTML structure and CSS classes, changes in future Dynamics 365 updates may affect how custom styles behave. Always test customizations after platform updates.
In Dynamics 365 model-driven apps, there is no supported way to directly add custom CSS to standard components such as forms, views, dashboards, grids, or command bars. For these areas, Microsoft recommends using supported customization options like form configuration, themes, business rules, custom pages, and PCF controls.
Custom CSS is supported in:
-
Power Pages (Dynamics 365 portals)
CSS files can be added through Web Files, Portal Management, or Power Pages Design Studio to customize pages, forms, lists, buttons, and layouts.
-
Custom pages in model-driven apps
CSS, HTML, and JavaScript can be used where supported.
-
Power Apps Component Framework controls
Developers can use CSS to style custom components.
It is also reasonable to avoid relying on CSS changes that modify internal Dynamics 365 elements, as updates may affect unsupported customizations.
-
Yes, custom CSS can be used to hide specific interface elements, such as delete buttons in subgrids or modify the appearance of form fields. By targeting specific CSS selectors, subgrid IDs, or record attributes, you can control the visibility and styling of selected elements.
Yes, JavaScript is typically required because Dynamics 365 CRM forms do not allow direct CSS file uploads for form styling. JavaScript web resources are used to dynamically inject CSS into the form when it loads, enabling custom design changes across CRM components.
Related Content
Table of contents:

