SOLVED

Re: How can I add a conditional !doctype html html head !--if IE style type="text/css" span.mktFormMsg margin-top:0px /style !endif-- /head into a form?

Go to solution
Anonymous
Not applicable

How can I add a conditional !doctype html html head !--if IE style type="text/css" span.mktFormMsg margin-top:0px /style !endif-- /head into a form?

I have to create a conditional for span.mktFormMsg in ie. I added the code below ito the editing box but it was ignored:

<!doctype html>
<html>
<head>
<!--[if IE]>
<style type="text/css">
      span.mktFormMsg {
       margin-top:0px;
}
</style>
<![endif]-->
</head>

Rest of the code
</html>

Can you please indicate where can I place it?

Thank you.


Regarding your response:
1. We will be dropping the form into several landing pages
2. I added the code into the HTML editor in the form
3. I did not use the emulation tool. I am testing directly into ie.

Can you please indicate where can I place the conditional?

Thank you.
Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Matt_Stone2
Level 9

Re: How can I add a conditional !doctype html html head !--if IE style type="text/css" span.mktFormMsg margin-top:0px /style !endif-- /head into a form?

Are you dropping the form onto a Marketo landing page or embedding it? If the former, you can try placing the conditional CSS in the landing page layout.

As a side note: if you're testing this with Internet Explorer's developer tools, more recent versions did not recognize conditional comments with the emulation tool -- though it looks like they even-more-recently fixed it: http://connect.microsoft.com/IE/feedback/details/806767/conditional-comments-do-not-work-when-emulating-document-modes-via-f12-developer-tools

View solution in original post

3 REPLIES 3
Matt_Stone2
Level 9

Re: How can I add a conditional !doctype html html head !--if IE style type="text/css" span.mktFormMsg margin-top:0px /style !endif-- /head into a form?

Are you dropping the form onto a Marketo landing page or embedding it? If the former, you can try placing the conditional CSS in the landing page layout.

As a side note: if you're testing this with Internet Explorer's developer tools, more recent versions did not recognize conditional comments with the emulation tool -- though it looks like they even-more-recently fixed it: http://connect.microsoft.com/IE/feedback/details/806767/conditional-comments-do-not-work-when-emulating-document-modes-via-f12-developer-tools
Anonymous
Not applicable

Re: How can I add a conditional !doctype html html head !--if IE style type="text/css" span.mktFormMsg margin-top:0px /style !endif-- /head into a form?

Regarding your response:
1. We will be dropping the form into several landing pages
2. I added the code into the HTML editor in the form
3. I did not use the emulation tool. I am testing directly into ie.

Can you please indicate where can I place the conditional?

Thank you.
Matt_Stone2
Level 9

Re: How can I add a conditional !doctype html html head !--if IE style type="text/css" span.mktFormMsg margin-top:0px /style !endif-- /head into a form?

Try dropping it into the landing page template's HTML.

Go into the Design Studio > Landing Pages > Find the template(s) of the pages that will have the form on them > Click "Edit Draft"

You'll see the full code for the landing page template and you can scroll down till you find the </head> tag and put your conditional styling right above it.

Make sure to approve the template and the updated draft of your landing page and see if that works.