View Full Version : Sticky Content Script issues

04-01-2014, 01:22 PM
Sticky Content Script


I get duplicate content in Opera (20) and Chrome, need help :)


04-01-2014, 04:25 PM
This script might not be able to handle the type of content you're using in those browsers. But the demo page for the script works fine in those browsers, so it might be some other issue.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

04-01-2014, 05:26 PM
Hi, thank you for replying to my issue.

Here is my code:

-webkit-transition-duration: 0.5s; /*Webkit: Animation duration*/
-moz-transition-duration: 0.5s; /*Mozilla duration version*/
-o-transition-duration: 0.5s; /*Opera duration version*/
-webkit-box-shadow:0px 0px 30px gray; /*Safari shadow version*/
-moz-box-shadow:0px 0px 30px gray; /*Mozilla shadow version*/
box-shadow:0px 0px 30px gray; /*CSS3 shadow version*/


<script src="jquery.min.js"></script>

<script src="stickycontent.js">

* Sticky Content script (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.



//initialize sticky content:


gap: 5,
stickyclass: "docked"


<div id="samplemenu" style="width:180px;height:500px;overflow:hidden;">
<iframe src="http://annonse.aftenbladet.no/salomonsen/2014/03/980x150/" width="180" height="500" frameborder="0" scrolling="no" style="float:left;height:500px;"></iframe>
<div style="height:1000px"></div>

04-01-2014, 08:19 PM
Try adding fixed position to the iframe:

<iframe src="http://annonse.aftenbladet.no/salomonsen/2014/03/980x150/" width="180" height="500" frameborder="0" scrolling="no" style="float:left;height:500px;position: fixed;"></iframe>

04-02-2014, 06:45 AM
Hi and thank you.
I tried your suggestion, but it did not solve the issue.

04-02-2014, 02:17 PM
It worked here:


04-02-2014, 05:41 PM
Hi again. I see that it seems to work on the link you posted, i've altered the code, but still there are issues.

Maby it's because there is an element above the docking banner ad? It seems to stay "fixed" till i scroll for about 500-700 pixels befor sticking to the top of the browser window.

Please see it in action on the following url:


PS: I have also tested With the docking script, it Works better (when i put in a negative margin for the element) but it is not sticking smoothly, it is "jumping as i scroll"
(This last sentence probably don't belong here, but i have been testing and testing With these two scripts, that i love, but i like the smoothness and shadow feature of the Sticky Content Script.)

04-04-2014, 12:39 AM
As far as I can tell, that page is much more complex than the relatively simple (though complex in its own way) demo I set up from the original markup you supplied. My suggestion would be to abandon the use of the script, as the page stands on its own quite well without it, and is perhaps less confusing to viewers without the sticky content or similar scripts.