fixed-sticky
fixed-sticky copied to clipboard
Is the fixed DIV expected to lose its width in Chrome?
I use Bootstrap 3 and am experiencing the exact same issues as I would when using position:fixed on on of my columns when using this plugin.
As I scroll the browser, when the fixing/stickying kicks in my div width changes. I just want to keep it the same width. This is happening in Chrome but not Firefox.
It also only works when applying the ID and class to the column itself, and not a child div of the column:
Works:
<div id="fixedQuoteSidebar" class="col-md-4 hidden-sm hidden-xs fixedsticky" >
<div class="alert alert-success paddingtop5 text-center">
</div>
</div>
Does not work:
<div class="col-md-4 hidden-sm hidden-xs " >
<div id="fixedQuoteSidebar" class="fixedsticky">
<div class="alert alert-success paddingtop5 text-center">
</div>
</div>
You may be able to extend the JavaScript using this code to keep the element in the bounds:
$('#fixedQuoteSidebar').css('width', $('#fixedQuoteSidebar').parent().width()).fixedsticky();
Note: You need to reassign the width whenever the browser is resized.