• Resolved GSPinto

    (@gspinto)


    Hi,

    Is there a way I can get the sidebar widget (let’s say the call to action widget) fixed on screen while the user scrolls down the post?

    I want a contact call to action button to be always present while the user reads through.
    It’s for a localhost website I’m developing.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey,

    You could do it, though I would probably need to see your website for some exact code.
    You can add this in a regular text widget:
    <a href="http://yoururl.com/contact" class="welcome-button fixed-button">Button</a>
    And this in a custom CSS plugin:

    .fixed-button {
         position: fixed;
         top: 50%;
         right: 30px;
         z-index: 9999;
    }

    And adjust as needed.

    Thread Starter GSPinto

    (@gspinto)

    Hi Vlad,

    Sorry for the late reply.
    I managed to tweak things to get what I wanted, thanks to your input of course.
    thank you!

    Thread Starter GSPinto

    (@gspinto)

    I don’t know if what I did was the most simple solution.

    I basically copied the welcome-button styles to this new fixed-button,
    gave it a fixed width (150px) and used your top, right and z-index attributes.

    Well, that’s why I added the .welcome-button class in that link, so you don’t have to copy the styles 🙂

    Thread Starter GSPinto

    (@gspinto)

    hehe… Newbie here.
    Just removed the redundancies and all works perfect.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Fixed sidebar widget while scrolling’ is closed to new replies.