Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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.
    #1118376

    Hey Enis,

    Please provide a link to the site/page in question so we can look into this further.

    Best regards,
    Jordan Shannon

    #1118521
    This reply has been marked as private.
    #1118622

    Hi,
    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,
    Mike

    #1118764

    Hello 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.
    #1119482

    Hello Mike,

    I am curious if you have seen my reply? How can I solve my problem?

    Thanks
    Enis

    #1119782

    Hi,
    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,
    Mike

    #1121240

    Hello 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.
    Enis

    #1121303

    Hi,
    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Code Block removes a tag’ is closed to new replies.