Inline styles are typical of sliders since they are generated by Javascript on the fly to help support responsive slider function. This is true of most slider libraries including the one that we use – Slick.
If you think you are something else that can truly be moved to a separate file, pls clarify. We can surely help.
I need this for the Content Security Policy. Please let me know how can I move the styles to a separate file. Thank you
Can you pls provide me details about which inline styles you are referring to? A screenshot of the styles you see on your site will help. Thanks
Hi, please find the html code below
<div class="lae-post-overlay lae-post-featured-img-bg" style="background-image: url(......); height: 575px;">
Thanks for clarifying.
This can be done safely since we make use of templates extensively in our plugin.
Will post a solution in the next few hours to help move the CSS to a file.
Please override the existing template file –
wp-content/plugins/addons-for-elementor/templates/addons/posts-slider/style-1.php
by copying it to the folder –
wp-content/your-theme/addons-for-elementor/addons/posts-slider/style-1.php
Once copied, you can modify the file line number 38 from –
<div class="lae-post-overlay lae-post-featured-img-bg" style="background-image: url(<?php echo $image_src; ?>); height: <?php echo $settings['slider_height']; ?>px;">
to
<div class="lae-post-overlay lae-post-featured-img-bg">
<img src="<?php echo $image_src; ?>" alt="<?php echo $settings['display_title']; ?>" class="lae-image"/>
and you are all set.
Pls make sure the images are all same aspect ratio since we are trying to move from background image to IMG tag.
Thank you very much for the support.