Cannot put a DIV in a Link in a Token

Robb_Barrett
Level 10

Cannot put a DIV in a Link in a Token

Wondering why this is happening.

I have a Rich Text token that has a table with 1 row, 3 cells. I want the cells to be clickable so I'm using the standard method I would use in HTML: <td><a href><div style="height:100%;width:100%">My text</div></a>.

When I save the token, Marketo strips the link. I'm allowed to put the link directly around the text but not around the DIV.  Wondering why this is happening and if anyone else has experienced this or has a workaround.

6 REPLIES 6
Justin_Cooperm2
Level 10

Re: Cannot put a DIV in a Link in a Token

Can you paste the actual HTML you put in the token here?

JD_Nelson
Level 10 - Community Advisor

Re: Cannot put a DIV in a Link in a Token

Would  <span style="display: block;"> work instead of the div?

SanfordWhiteman
Level 10 - Community Moderator

Re: Cannot put a DIV in a Link in a Token

Yeah, <DIV> is not valid inside <A> until HTML5 and if this is an email you have to assume you're building for HTML4 renders (Outlook, for example, does not understand HTML5).

Robb_Barrett
Level 10

Re: Cannot put a DIV in a Link in a Token

It's for an LP actually.  I posted a description of the code...I'm wrapping the A around a DIV in a token but Marketo strips it out upon save.

SanfordWhiteman
Level 10 - Community Moderator

Re: Cannot put a DIV in a Link in a Token

Hmm, I assume it's still for the same legacy HTML4 reason.  I thought I recalled that Justin said the new editor was supposed to be flexible w/this so try changing the template to an HTML5 DOCTYPE.

Justin_Cooperm2
Level 10

Re: Cannot put a DIV in a Link in a Token

Hi Robb, this is why it's hard to comment unless we understand the full context and can see the code you are using. Are you using a "free form" landing page? If so, is it "Mobile Compatible" or not? Are using a "guided" landing page?