x

How to make 'sticky text'?

My navigation bar is located on the left side of my website. Is there any way to make normal text stay fixed while I'm scrolling through the page?

The text that I'd like to make sticky:

image

Also:
Is there a way to make it so that if I put "2020" later on one page and scroll past "2020", the "2019" header will move out of the way for "2020"?
Thank you 
 
Tags (3)
1,682 Views
Message 1 of 12
Report
11 REPLIES 11
Square

What is the address of your site, @AngelaD? It might be possible, although I'm sure our Community members would probably need to see the site in action.

1,666 Views
Message 13 of 12
Report

https://pixpaassets.weebly.com/ is my site address

1,621 Views
Message 13 of 12
Report
Square

Thanks for posting, @AngelaD I won't be much help code-wise, but just to clarify for other members on here, where is "2019"?

1,620 Views
Message 13 of 12
Report

"2019" is just used to identify the content below which were made in 2019
1,616 Views
Message 13 of 12
Report

@Adam Are you able to do it?
1,605 Views
Message 13 of 12
Report

Hey there - I can help with this, but I don't see the text "2019" on your site. Is it not on the home page?

1,603 Views
Message 13 of 12
Report

I think there is one here https://planzassets.weebly.com/sets.html

1,602 Views
Message 13 of 12
Report

Thanks! I think it would be tough to get that to have a fixed position without affecting other elements on the page. Something like this in an Embed Code element might work instead, though:

<style>
    .fixedHeaderTitle
    {
        position: fixed;
        top: 0;
        background: #fff;
        width: 100%;
        z-index: 1000;
        padding: 25px;
    }
    .wsite-section-elements
    {
        margin-top: 75px;
    }
</style>
<div class="fixedHeaderTitle">
    <div class="paragraph" style="text-align:center;">
        <font size="4">
            2019
        </font>
    </div>
</div>

1,601 Views
Message 13 of 12
Report

It works, thank you!!
1,596 Views
Message 13 of 12
Report

Is there a way to make it so that if I put "2020" later on one page and scroll past "2020", the "2019" header will move out of the way for "2020"?
737 Views
Message 13 of 12
Report

Hmm... I'm sure there's a way to do that, although it's probably more complicated and a bit out of my own skillset. Maybe someone else has an idea?

736 Views
Message 13 of 12
Report