[Resolved] Sticky LEFT sidebar….

Home Forums Support [Resolved] Sticky LEFT sidebar….

Home Forums Support Sticky LEFT sidebar….

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #931035
    Tim

    Some weirdness here.
    I simply want a stocky left sidebar on a page that has a header, menu, left sidebar with content area, and a footer.

    I have seen the code – here –for a RIGHT sticky sidebar VIZ

    @media (min-width: 769px) {
       #right-sidebar {
    		
            position: -webkit-sticky;
            position: sticky;
            top: 0;	 		
        }
    }

    and thought – optimistically that changing #right-sidebar to #left-sidebar would work…
    Sadly not! I DO end up with the left sidebar sticky … on the right side!

    For avoidance of doubt, this is what I have in the css:

    @media (min-width: 769px) {
       #left-sidebar {
    		
            position: -webkit-sticky;
            position: sticky;
            top: 0;
    		 	 
    		 		
        }
    } 

    The site is a test site with GP pro, all modules except woo active and only the gp and simple css plug in… The left sidebar has a single text widget in it.
    I have NO idea what’s going on. The problem is consistent across a live site (so I am not using it there).

    Help?

    NB I tried adding a

    left: 0;

    But that had no effect at all..

    PPS I KNOW I can use a plug in to achieve this – and I have on a live site but – really – can’t see why I can’t do it with simple CSS…. πŸ™

    #931151
    David
    Staff
    Customer Support

    Hi there,

    the plugin is the simplest option. The issue with using CSS is that the Sidebar is positioned using floats and the unsemantic grid. Using the Position sticky stops the float from working and it falls back to its natural position. Adjusting its horizontal position with position sticky is a right pain.

    #931158
    Tim

    Thanks David,
    thought it might be too easy πŸ˜‰

    I’m using the WP Sticky Sidebar plug-in and using the #left-sidebar selector which seems to do the trick.

    Appreciate the response on the weekend!
    Cheers

    #931167
    David
    Staff
    Customer Support

    You’re welcome πŸ™‚

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.