Skip to content

Instantly share code, notes, and snippets.

@marklchaves
Last active November 24, 2021 11:21
Show Gist options
  • Save marklchaves/31bbb2ad973e533a4863f9eacf0277c7 to your computer and use it in GitHub Desktop.
Save marklchaves/31bbb2ad973e533a4863f9eacf0277c7 to your computer and use it in GitHub Desktop.
How to Create a Floating Column Using CSS position: sticky in Avada

Usage

  1. Create your columns in Fustion Builder.
  2. Select the column you want to be sticky.
  3. Add floating-toc to the CSS Class setting for the column you selected.
  4. Add the following CSS to the page's CSS editor.
/** Add this to your page's CSS */
.floating-toc {
  position: sticky;
  top: 171px; /* Offset for the header. Adjust as needed. */
}

See the screengrabs in the comment below this gist.


References

How to add CSS to WordPress

Live demo on CodePen

CSS position on MDN


ko-fi

@Wordpresslover
Copy link

Wordpresslover commented Nov 23, 2021

@Paeddy85 no such built=in option in Avada. Avada has only sticky containers. For me Mark's css works:

  1. add css to you specific page or globally if you use it in many places.

/** Add this to your page's CSS /
.floating-toc {
position: sticky;
top: 171px; /
Offset for the header. Adjust as needed. */
}

  1. just add a class .floating-toc to your column and it should work.
  2. Report to Avada the need of a sticky column feature.

@Paeddy85
Copy link

@Wordpresslover Thanks for your answer. I've already tried this, but it doesn't work. What about the container settings are they right?

Bild1

Bild2

Angebot.Uberbauung.Bomus.-.Google.Chrome.2021-11-24.08-27-21.mp4

@Wordpresslover
Copy link

@Paeddy85 That's perrfectly okey wht you did. In your case an extra custom work is necessary though. If you want me to help you please contact me: https://companyromania.com/contact-us/

I will need a login to your test site to solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment