- This topic has 18 replies, 3 voices, and was last updated 4 years, 12 months ago by
Elvin.
-
AuthorPosts
-
April 8, 2021 at 8:12 am #1726526
Zdeněk
Hi, would you describe to me please how to insert button to Elements. For example I would like insert customizable button to the center of this page: http://cyklo.mestopacov.cz. Thank you very much for help and detailed description how to do it.
April 8, 2021 at 10:05 am #1726639Ying
StaffCustomer SupportHi there,
You can use a block element, build your custom button in the content field.
https://docs.generatepress.com/article/block-element-overview/Choose
hookas block type, choosegenerate_after_headeras hook, choosefrontpageas location.Once you built the structure, we can help with some CSS.
Let me know 🙂
April 8, 2021 at 8:06 pm #1727036Zdeněk
Thanks for answer. Because my skills are not good, I would be very happy for your help 🙂 I need insert button in center of page.
April 8, 2021 at 8:29 pm #1727044Elvin
StaffCustomer SupportHi there,
To clarify: you’re trying to add buttons within the Revolution Slider slides?
If that’s the case, we recommend asking its plugin’s support on the best practice in adding buttons as the theme doesn’t control how contents are added to their slides.
Revolution Slider is a third-party plugin. It’s a plugin outside of our scope, unfortunately.
April 8, 2021 at 8:37 pm #1727048Zdeněk
No, you don´t remember me 🙂 I would like to insert button across the revslider, i don´t want to use revslider button. The slides will be changing, but the button will be fixed all the time on the same place.
April 8, 2021 at 8:56 pm #1727053Elvin
StaffCustomer SupportCan you provide any mockup images of how you want the button to be laid out? For us to have a better idea on how to apply the button on your content.
Let us know.
April 8, 2021 at 9:23 pm #1727086Zdeněk
Yes, of course, here it is. Thanks!
PictureApril 8, 2021 at 9:50 pm #1727097Elvin
StaffCustomer SupportAh I see what you mean.
If that’s the case, consider doing this:
Things needed to make this work:
– Block editor (we can’t use generateblocks on classic editor)
– GenerateBlocks
– A bit of custom CSSFirst, let’s edit the page via WordPress’ default Block editor (Gutenberg).
Steps to do:
1.) Place a GenerateBlocks’ Container Block.
2.) On its “Additonal CSS (classes)” field, add “relative-container”.
3.) Add this CSS on Appearance > Customize > Additonal CSS
.relative-container { position: relative; }
4.) Add your Slider inside this Container Block.
5.) Add a GenerateBlocks’ Button Block.
6.) On this Button Block’s “Additonal CSS (classes)” field, add “absolute-centered-button”.
7.) Add this CSS on Appearance > Customize > Additonal CSS.absolute-centered-button { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }That’s basically it.
April 8, 2021 at 10:16 pm #1727116Zdeněk
OK, i did it all and now I see the button only for 1 second while loading page.
Thank you for your patience!
April 8, 2021 at 10:24 pm #1727124Elvin
StaffCustomer SupportAh right I forgot something.
Let’s add z-index to the CSS properties.
Edit this CSS:
.absolute-centered-button { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }Write it like this:
.absolute-centered-button { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 999999; }We basically just added z-index. With this, the button should be visible now. 🙂
April 8, 2021 at 10:26 pm #1727125Zdeněk
Yeah, that´s it! You are the best. Thanks 🙂
April 8, 2021 at 10:36 pm #1727128Elvin
StaffCustomer SupportNo problem. Glad you got it sorted. 🙂
April 8, 2021 at 10:46 pm #1727133Zdeněk
One more little thing – I need the expanded menu to overlap the slider and the button – is it possible?
April 8, 2021 at 10:50 pm #1727135Elvin
StaffCustomer SupportI’m not sure what you mean. The expanded menu is already overlaying on top of the slider. Care to explain a bit more? Perhaps a mockup image of how you want it to be laid out?
We might’ve put too much z-index though. Change the z-index value from 999999 to just
z-index: 9;so the button doesn’t go on top of the menu items.April 8, 2021 at 10:56 pm #1727137Zdeněk
Yes, fixed 🙂 Thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.