Site logo

Archived topic

Clickable Container Generatepress Premium & Generateblocks

3 replies · Started by Rostyslav on December 26, 2021

Viewing posts 1–4 of 4

Hello, I am trying to make a clickable container but I don´t know where to put the <a> link </a>

My CSS:

.clickable-container {
position: relative;
}
.clickable-container a {
position: absolute;
height:100%;
width:100%;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 999;
}

I added a css class: ".clickable-container" to the container. Now if I select the container and click on EDIT HTML https://ibb.co/hMrzW8X I see this: https://ibb.co/XCbjHDh :

<!-- wp:heading -->
<h2>Hello</h2>
<!-- /wp:heading -->

<!-- wp:paragraph {"textColor":"base-3"} -->
<p class="has-base-3-color has-text-color">Hello</p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<a href="/https://example.com/"></a>
<!-- /wp:html -->

Where in that code shoud I write this link: <a href="/https://example.com/"></a>

or maybe I just have to add a custom html block inside with link: <a href="/https://example.com/"></a> like in theis image: https://ibb.co/Kz1fFQq

How to do it properly?

Thnaks!!!

Hi there.

You can just select a Text Block in the visual editor and add a link to it. No need to create a separate HTML anchor for it.

Thanks!

You're welcome

This archived topic is closed to new replies.