-
AuthorPosts
-
January 16, 2023 at 1:32 pm #1378860
Hey Support Team,
I would like to add two fixed Graphic elements to my Layout. so the content is in between.
Element 2 is behind the content and Element 1 is on the top.
You can see it in the Picture below.How can i create it?
Element 2 and Picture 3 is easy. Done with just adding a background image.
But how can i get a third layer on the very top?Cheers and Thanks!
MonikaJanuary 17, 2023 at 6:21 am #1388004Hi Monika,
It is possible via some CSS code however we need a link to the page mentioned.
Also, add a Custom ID Attribute to the Color Section, so we can target it properly.Best regards,
NikkoJanuary 17, 2023 at 12:23 pm #1388035Hello,
ok in the private Section you get all the Informations.
I just gave the Element an ID Attribute.
Its called “ueberlappung”.What should I do next?
Cheers
MonikaJanuary 18, 2023 at 2:33 am #1393825Hi Monika,
Thanks for giving us admin access.
I have added this CSS code in Enfold > General Styling > Quick CSS, just replace the background image with the image of your choice:#ueberlappung { background-position: center right 32% !important; } #ueberlappung:after { background-image: url(https://website.com/wp-content/uploads/2023/01/element.svg); background-repeat: no-repeat; background-position: center left; content: ''; display: block; height: 100%; width: 100%; position: absolute; top: 0; right: 0; transform: scaleX(-1); }
Please review your site.
Best regards,
NikkoJanuary 24, 2023 at 6:05 pm #1394965Great thank you. I added a z line (because it should be on top)
But one Think I would like to change:
The new element on the top should only be visible in my #ueberlappung ID.
When i go on scrolling down, It shouldnt stay there.Can I change this, too?
I put thecode in the customizer, because there i can quickly see the changes i made.
Is there a difference?Cheers
MonikaJanuary 24, 2023 at 6:39 pm #1394971Hi Monika,
I have inspected the code and it seems that position: absolute was changed to position: fixed please use absolute positioning only as its context is the section unlike fixed which is the whole body.
Also try to change this code:
#ueberlappung { background-position: center right 32% !important; }
to:
#ueberlappung { background-position: center right 32% !important; overflow: hidden; }
I put thecode in the customizer, because there i can quickly see the changes i made.
Is there a difference?
Yes, the Quick CSS is stored in an external stylesheet (usually external css as cached and minified) while the customizer’s CSS is embedded which is not a separate file but stored in the html page itself.Best regards,
NikkoJanuary 24, 2023 at 8:46 pm #1394995Thank you!
But i want the element to be fixed. It should be like the element on the bottom. It stays in its section and is fixed within there.
Is it possible to tell the element it should go away with it’s section?January 25, 2023 at 3:39 am #1395024Hi Monika,
Absolute and Fixed positions are almost the same in that both of them are floating however they differ in the context where absolute position always positions itself to its closest parent that has a relative position, and fixed position always position itself relative to the viewport, that’s why it always shows up and not bounded by any elements.
Best regards,
NikkoJanuary 25, 2023 at 9:04 am #1395087🥳🥳🥳 NOW It’s perfect!
Thank you!January 25, 2023 at 9:05 am #1395088But is it also possible to stick the element? i want my picture scoll behind it.
Not it sticks to my picture. But i wanted the feeling that my pictures moves between these two elementsJanuary 25, 2023 at 3:07 pm #1395152Hi Monika,
You’re welcome :)
As for your last request, I could not provide a working solution at the moment, however, I can point you to the direction on finding the answer to that request:
1. Add a custom js function (recommended: script on footer section): https://kriesi.at/documentation/enfold/add-custom-js-or-php-script/
2. Search for javascript or jquery code that will move elements when scrolling
PS. If I can get a working solution, I’ll post it here.Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.