Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
How can I fix a container at the top, so that it always stays at the top when scrolling (for mobile websites on smartphones). |
||||
|
Hi andi, 1. mouse rightclick on your container 2. in the popup window go to the field : additional Html code 3. choose additional css styles 4. insert position: fixed; 5. click ok that should work sunny greetings from the lake Chiemsee Steve |
||||
|
supplement: andi you will not see the fixed effect in the rc you only see it in the broser preview or in your published website! steve |
||||
|
supplement 2: sorry andi, but I have forgotten that rc is not much dealing with the z-index so the correct insert is: position: fixed; z-index: 1000; have a good day steve |
||||
|
Hello Steve thanks for the answer, but unfortunately that doesn't work. I have a main container for the website. All other containers are then in it. When I fix the upper container, the other containers move upwards, but "over" the upper container. |
||||
|
"I think, you must place this fixed-container before your main-container" |
||||
|
I want to realize the following: When using Handy, the upper level should always remain at the top when scrolling. For example like at https://www.n-tv.de |
||||
|
Good morning andi, I think you must set the z-index of your main container to a lower amount than 1000 like z-index: 1; greetings steve |
||||
|
andy another tip: If your fixed container has a height of f.e. 100, don't forget to place an same sized container with height 100 under your fixed container as a - distance to top keeper - otherwise the following scrolling container will hide at the start under your fixed container. Have a nice day Steve P.S. the easiest way to get your wished result with rc for example 1. maincontainer with z-1 2. backgroundcontainer height 100 3. fixed container height 100 with position fixed and z-1000 4. srollable container |
||||
|
Sorry Steve, that doesn't work, or I'm too stupid for this task. Have you tried that? Is there a step-by-step guide? many thanks for your help !!! |
||||
|
You can always send your .rcd file to support and they can then take a look at it and help you a bit more, probably. |
||||
|
Hi andi, I made a little .rcd file with your wished fixed top container in the way i told you and checked it in firefox and it's running well. If you want I can send this rcd file as a "start" for you. but I need your email-address. sunny greetings steve |
||||
|
Hello, i found my mistake. My top container was inside my main container. With position: fixed; z index: 3000; then worked. I placed an empty container under the top container and I was able to determine the distance to my main container from the height of the container. Thanks to all helpers. |
||||
|
"I think, you must place this fixed-container before your main-container" |
|