background image of suck element being removed
-
Hi,
It looks like v2.22 is re-writing the stuck element and removing any pre-set background image style.
After setting a space between top of page and sticky element using a negative number, and monitoring the html as the page is scrolled..
The page (and header) is shown correctly at load.
<div class=”sticky-element-placeholder” style=”width: 0px; height: 0px; margin: 0px; padding: 0px;”></div>
<header id=”masthead” class=”site-header sticky-element-original sticky-element-active element-is-not-sticky” role=”banner” style=”background-image: url(/header.jpg); “>When scrolling the page, at the point set, sticky kicks in and re-writes the html – sticking the element to the top correctly – but removing the background image..
<div class=”sticky-element-placeholder sticky-element-active” style=”display:block; float:none; flex:0 1 auto; box-sizing:border-box; clear:none; overflow:visible; transform:none; width:905px; height:255.5px; margin:0px 0px 67.7728px 0px;”></div>
<header id=”masthead” class=”site-header sticky-element-original element-is-sticky” role=”banner” style=”margin-top: 0px !important; margin-left: 0px !important; position: fixed; left: 0px; top: -150px; width: 905px; padding: 41.8868px 0px 0px; z-index: 9999;”>As you can see, the header with tag masthead has had the background-image style removed, which of course removes the background image from that element.
When you scroll back to the top, it’s re-written back again, and the background image re-appears..
I’m going to roll back to v2.21 for now – as that version worked perfectly.
Many thanks for your consideration on this.
Keith.
- The topic ‘background image of suck element being removed’ is closed to new replies.