Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

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

Open
jameswilson34 opened this issue Mar 31, 2015 · 1 comment
Open

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

jameswilson34 opened this issue Mar 31, 2015 · 1 comment

Comments

@jameswilson34
Copy link

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>
@yatil
Copy link

yatil commented Jun 3, 2015

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.

djozsef pushed a commit to djozsef/fixed-sticky that referenced this issue Jun 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@yatil @jameswilson34 and others