Site logo

[Resolved] Add floating element without sidebar

Home Forums Support [Resolved] Add floating element without sidebar

Home Forums Support Add floating element without sidebar

Viewing 7 posts - 16 through 22 (of 22 total)
  • Author
    Posts
  • #1705902
    Shivam

    Hey David, I have found a solution. Here is what i have done:

    1. First added a Genereatblock directly in the content at the desired place (from where I want it to start scrolling).

    2. I added this css code to float it to the right and scroll as the user scroll the page.

    @media (min-width: 769px) {
        .floating-content {position: sticky;
        float: right;
        top: 25%;
        margin-right: -301px;
    	}}

    Here is the link of page – https://www.staging2.nerdblogging.com/schema-markup/

    Can you please check and confirm whether it is the right way or not?

    #1707355
    Shivam

    Hey David, have you checked that because I wanted to apply it to my every post.

    #1707359
    Elvin
    Staff
    Customer Support

    Hi there,

    It should work for all posts assuming all your posts have the same element with the same specific selector. 🙂

    #1707362
    Shivam

    Yes, I have same element on all the posts, I just wanted to confirm whether it is the right CSS implementation and it will work on all browsers and desktops or not? Since I am not good with Codes I wanted an expert opinion.

    #1707413
    Elvin
    Staff
    Customer Support

    Yes, I have same element on all the posts, I just wanted to confirm whether it is the right CSS implementation and it will work on all browsers and desktops or not? Since I am not good with Codes I wanted an expert opinion.

    It will work on some tablets and all common desktops viewport sizes. (tablets are included in min-width:769px)

    And yes it should work on most modern browsers as well but not on old internet explorer browsers as this browser doesn’t support position: sticky;. But for all modern browsers, this should work as there’s no vendor specific properties on your code.

    #1707476
    Shivam

    Thankyou elvin!

    #1708670
    Elvin
    Staff
    Customer Support

    No problem.

Viewing 7 posts - 16 through 22 (of 22 total)
  • You must be logged in to reply to this topic.