Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Sticky sidebar pops out

Posted on 2013-05-12
4
Medium Priority
?
321 Views
Last Modified: 2013-05-13
Head over to here
Scroll down a bit and you will see the sidebar becomes sticky but it overlaps the main content - you will need your browser at 1100px or more to see it
It's like its ignoring the container width.

This is the plugin I'm using http://stickyjs.com/
0
Comment
Question by:Gary
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 4

Expert Comment

by:ramyajanarthanan
ID: 39160669
In your page initially position is set to static and when scrolled set to fixed.

try setting your class=left-sidebar

position:absolute;
float:left;
and left,right alignments.

I hope the problem is due to positioning.width of left bar as I'm not able to check since i don't have your exact code and on firebug on scrolling the style gets changed.
0
 
LVL 58

Author Comment

by:Gary
ID: 39161345
position:absolute is not a fix - that will only mess up the whole layout.
0
 
LVL 43

Accepted Solution

by:
David S. earned 2000 total points
ID: 39161787
The problem is due to the percentage width interacting with how the script works. You see before you scroll down the sidebar has "position:static" but after you scroll down it has "position:fixed". "position:fixed" causes the sidebar's "positioning context" to be different, so the percentage width refers to the width of the <html> element instead of that of ".wrap". It looks like the simplest solution would be to simply give "max-width: 238px" to ".left-sidebar".
0
 
LVL 58

Author Closing Comment

by:Gary
ID: 39162132
static is set by the plugin because it clones the object and it is the cloned object that has position:fixed but..
Adding a max-width fixes it, almost, it still extends a bit at smaller resolutions but I can live with that as it doesn't extend to the main content.
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question