3

Is there a way to create a module, which is floating in its position (and only in its position)?

http://aebb.es/4 here I would like to have the fixed opt-in module on the right side to float always on top of page during scrolling. But the module shall never leave the position "sidebar-right" on scrolling

Was thinking if it is solvable via CSS3? Also open for other solutions

2

You can achieve this by using the following (fetch first the 30% sidebar and define on page surround the visibility):

.g-block.size-30 #g-aside {
    position: sticky;
    top: 50px;
}

#g-page-surround {
    overflow: visible;
}

The second block of code is a small fix, as a sticky position won't work if any of the parent elements have a hidden overflow.

Hope this helps

  • big thx! adding minor fixes as edit, but your sample worked great! Was not aware of adding the visible to the page itself. – laendle Jan 14 at 13:46
  • @laendle - oops, thanks for the edit. Glad it worked for you :) – Lodder Jan 14 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.