J!Extensions Store™
Faq Styles don't apply to mobile devices, what could be the problem?

Styles don't apply to mobile devices, what could be the problem?

Created on:Tuesday, 27 January 2015 00:00

If you have assigned styles to elements in your template using the Styles Dashboard but they don't apply to mobile devices, the problem could be due to your particular template using different css classes to identify mobile devices.

Some Joomla templates assign different css classes to the 'html' root tag of the page when the site is rendered on mobile or desktop, thus the styles applied when working on the desktop version won't match the mobile one.

To solve this normally it's enough to switch to 'Yes' the parameter 'Exclude top 'html' node' in the dashboard settings. In this way the top 'html' root node will be ignored when applying styles ensuring that elements will match despite the fact that the root node will have different classes on mobile.

Notice that if you have already applied styles when the parameter 'Exclude top 'html' node' was still disabled they must be deleted and applied again after than the parameter has been enabled to match elements with the new path.