DIV element "a" Tag Bug in Header Builder — doesn't contain chid elements

Hello there,

I was just working on a new menu for my site in the header builder and I discovered that when I insert a DIV element and set its tag to <a>, it prints on the front end the containing elements as siblings to the div and not as children of the div. It works as expected in the Cornerstone builder. The reason I know it is a bug is because when I change the “tag” of the DIV element back to <div>, it works as expected in the front end.

I can explain further, if necessary, but I’m in a time crunch with other things at the moment. In the meantime, you can see the link above in the “Resources” mega menu for an example.

Hello @bobbybosler,

Thanks for writing in!

You cannot nest <a> tag which means that if you insert a DIV element and change the tag to <a> while the element itself has already some link elements inside, it will create an issue.

<div element>
  <image element>
   <a>some link<a>
   <a>some link<a>
  <div another ></div>
</div>

If you change the div element into <a>, your links inside it may not work and potentially have other issues or conflicts as well.

<a div element>
  <image element>
   <a>some link<a>
   <a>some link<a>
  <div another ></div>
</a>

Hope this makes sense.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.