Issue: Modules may not resize or rearrange appropriately on various devices, leading to a suboptimal user experience.
Solution:
Make sure your modules are designed to be responsive! It's great to use flexible grid systems and relative units like percentages instead of fixed widths. Don’t forget to incorporate media queries to tweak styles for various screen sizes. When creating custom templates, try implementing a column layout system similar to HubSpot's CMS Theme Boilerplate to boost that responsiveness.
Issue: In drag-and-drop email templates, elements may not stack as intended on mobile devices, affecting readability.
Solution:
HubSpot's drag-and-drop email templates are super responsive right from the start! If you encounter any stacking issues, don’t worry—you can easily customise the classes, styling, and markup to fit your needs. Using HubSpot's default classes effectively can help you achieve the perfect stacking order and keep everything looking excellent and responsive!
Issue: Emails designed with drag-and-drop modules may display differently across email clients, particularly in Outlook.
Solution:
For smoother rendering in Outlook, it's best to set pixel width values for blocks rather than using percentages. To achieve the perfect size, don’t forget to use the width attribute in the <table> tag and inline CSS!
Issue: Integrating custom CSS frameworks with HubSpot's drag-and-drop areas can lead to conflicts or unexpected behaviour.
Solution:
You can quickly implement a custom CSS framework by adding it to your module and applying the necessary class names. If you run into any conflicts, consider excluding the framework’s grid system or renaming it to prevent clashes. This approach allows you to use your favourite CSS framework while enjoying the handy features of HubSpot's drag-and-drop functionality.
Issue: Responsive design relies on properly defined breakpoints, ensuring content looks good across all devices. HubSpot provides basic breakpoint settings, but fine-tuning with custom CSS is sometimes necessary.
Solution:
How to Implement in HubSpot:
Example:
Issue: The object-fit CSS property helps images or videos resize correctly within their containers. Without this, images may get stretched or cropped unpredictably.
Solution:
Example:
CSS: