Support » Plugin: Elementor Page Builder » CSS Class not displaying

  • Resolved sprockettechweb

    (@sprockettechweb)


    If I add a CSS class to the “CSS Classes” field under the advanced tab on a Heading, it is not generated in the source code of the page and thus cannot be used.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • That’s definitely not normal.

    1. Ensure you meet the system requirements, which you can find at https://docs.elementor.com/article/38-requirements. You can check if your system meets these requirements by going to Elementor > System Info. Two of the main things to check are the PHP version and memory limit, but also take note of any other items that might indicate a problem. Please ask your host for help in changing your PHP version and to increase the amount of PHP memory allocated. If you would like to increase the memory limit yourself, please see this guide: https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

    2. Make sure you are using the most updated versions of Elementor, Elementor Pro (if you are using that), WordPress & your theme. Sometimes it isn’t obvious that there is an update available. Go to Dashboard > Updates and click the Check Again button to be sure.

    3. Deactivate all of your plugins except Elementor and Elementor Pro. If this solves the problem, reactivate each plugin one by one, until you spot the problematic plugin. If found, contact that plugin’s developers for help, or use a different plugin.

    4. Switch your theme (temporarily) to a default WP theme such as Twenty Fifteen to see if your theme is causing an issue. If so, contact the theme’s developers for help, or use a different theme.

    5. Clear all cache (server cache, caching plugin, and browser cache).

    Ah, I see the issue now. The class is appearing, but on a container div, not the heading I add it to. So for example, if I add a class to an H2 heading, it appears on the div elementor-element (there is another nested div, elementor-widget-container, before the H2). Shouldn’t it appear on the H2 heading itself?

    Ah yes, sorry, that is normal for Elementor. This is how it works, the CSS classes and ID are added to the widget’s top main HTML tag. The reasoning behind it makes sense once you get into the details, which you can read about at https://github.com/elementor/elementor/issues/1204

    One could always use the preceding container to target the higher level, but I see your point. It would be useful to have the option to add it to the top tag or not (or both). If you can select the html tag under content, you should be able to also add a class or ID directly to it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.