• Hi all,

    I am trying to change the background colour of a DIV (see MYCOLOUR below for the DIV Position) based on the value in the figcaption element (see MYVALUE below for placement) using the class I have set – see MYCLASS below.

    I have limited control over the page HTML and I have therefore onky been able to add a class to adi in targetting.

    Could anyone help with how best to target the DIV please?

    Thanks

    <div class="elementor-widget-wrap">
        <div class="elementor-element elementor-element-58e81d2 <strong>MYCLASS </strong>elementor-widget elementor-widget-theme-post-featured-image elementor-widget-image" data-id="58e81d2" data-element_type="widget" data-widget_type="theme-post-featured-image.default">
            <div class="elementor-widget-container" style="background-color: <strong>MYCOLOUR</strong>;">
                <div class="elementor-image">
                    <figure class="wp-caption">
                        <a href="XXX">
                        <img width="150" height="150" src="" class="attachment-thumbnail size-thumbnail" alt="" srcset="" sizes="(max-width: 150px) 100vw, 150px">								</a>
                        <figcaption class="widget-image-caption wp-caption-text"><strong>MYVALUE</strong></figcaption>
                    </figure>
                </div>
            </div>
        </div>
    </div>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Targeting a DIV for styling’ is closed to new replies.