fixed-sticky icon indicating copy to clipboard operation
fixed-sticky copied to clipboard

Is the fixed DIV expected to lose its width in Chrome?

Open jameswilson34 opened this issue 9 years ago • 1 comments

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>

jameswilson34 avatar Mar 31 '15 15:03 jameswilson34

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.

yatil avatar Jun 03 '15 13:06 yatil