-
AuthorPosts
-
July 13, 2019 at 4:32 pm #1118351
Hi,
I am trying to place a DIV element inside an A link Element inside the code block.
What I want is to make the whole div clickable and be able to use hover effects.My code is working in when I control it in CodePen but on my page when I save and refresh, I realize that the A link Element is removed by Enfold.
When I have A link element without any div inside, then it executes the link correct.As far as I know html 5 allows placing a Div element inside A element
How can I over come this problem?The code I am trying to use is:
<div class="individual-work a_link" style="width: 400px; height: 400px; position: relative; left: 0px; top: 0px; background-color: wheat;"> <a href="#">This link works</a> <a href="This Link is removed"> <div class="work-caption"> <h3 class="c-subheading c-subheading--sm">Istanbul Photo Tour</h3> <h2 class="c-heading c-heading--lg"> <span class="masked-copy-wrapper"> <span class="masked-copy masked-copy--1">Imperial Capital</span> </span> <span class="masked-copy-wrapper"> <span class="masked-copy masked-copy--2">of the Ottoman</span> </span> </h2> <p class="c-copy c-copy--lg category-list">Daily Street Photography</p> </div> </a> </div>
- This topic was modified 5 years, 5 months ago by indurango.
July 13, 2019 at 7:37 pm #1118376Hey Enis,
Please provide a link to the site/page in question so we can look into this further.
Best regards,
Jordan ShannonJuly 14, 2019 at 7:28 pm #1118521This reply has been marked as private.July 14, 2019 at 11:15 pm #1118622Hi,
I took a look at your div that is not acting as a link, and found that the div is not wrapped with “a” it’s actually like this:<div class="box wide tall"> <a href="www.yoursite.com"></a> <div>This is a Div element inside A link element but it does not act as a link</div> </div>
Best regards,
MikeJuly 15, 2019 at 1:41 pm #1118764Hello Mike,
That is the thing with my problem, I am wrapping the DIV “A Element” Then I save and when I check it on the page source I see that the ALB or code block element changes the code.
The thing is, a few times I was able to see the code working and the DIV was inside the A Element.. So there is a problem going on with either code block element or with Enfold ALB when saving the page..
I am attaching you the screen shots from my ALB , Shorcodes and the reflection of this code to the page after saving the page..
As you can see some how the DIV ıs taken out of A element…Code seen in ALB
Code seen in shortcodes section
Code seen browser- This reply was modified 5 years, 5 months ago by indurango.
July 17, 2019 at 10:32 am #1119482Hello Mike,
I am curious if you have seen my reply? How can I solve my problem?
Thanks
EnisJuly 18, 2019 at 6:03 am #1119782Hi,
Sorry for the late reply, thank you for the feedback, I have tested your code block on my localhost and on your site without error.
Perhaps the error is from a plugin if this occurs again please try disabling your plugins to see if that helps.Best regards,
MikeJuly 23, 2019 at 5:53 pm #1121240Hello Mike
Thank you for this. I think this was related with my other problem in CSS file..
Now it works fine. You can close this ticket.Thank you.
EnisJuly 23, 2019 at 10:49 pm #1121303Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Code Block removes a tag’ is closed to new replies.