text-indent in gmail

I was trying to create HTML but it looks text-indent is not supported in google mail.
The same code works fine in other email clients.
Is it true or I may be doing something wrong ?

part of HTML

<p style="text-align:left;margin-top:8.00px;margin-bottom:0.00px;margin-left:50.00px;margin-right:0.00px;text-indent:-20.00px;line-height:1.00;"><span style="font-family:Arial;font-size:9.00pt;font-style:normal;font-weight:bold;color:#00707B;line-height:1.00;"><a style="color:#00707B;text-decoration:none;" href="http://www.fisglobal.com"><span style="color:#00707B;text-decoration:none;">Text with a full-width image</span></a>
</span></p>
roshodgekiss roshodgekiss, 3 years ago

Hi there writetonsharma, while I can verify that text-indent works in Gmail, I'm unsure if you can use negative values. Secondly, you've also given margin-left a value, which is in opposition to text-indent. Try using one or the other exclusively.

One more thing - you don't need to use decimal points with pixel widths. 20.00px  = 20px :)

Thanks, writetonsharma - I hope this helps you with your code! Let us know how you go.


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
writetonsharma, 3 years ago

Hi roshodgekiss, Thanks for looking at the problem.

Let me explain why this code is like this. I am a programmer of a product which generates various outputs and one of them is HTML. So this code is machine generated and that's why it is more generic in nature. We have a GUI where the user creates the documents and then generates an output he likes.
I am working on a new version of this HTML generator which generates HTML for emails clients. Why margins and indent is together has a reason. The user can use bullets and "first indent" with margins in the GUI and so I have to generate the same code as is being asked. Being generated from a program, it needs to be generic and defensive as to not generate a wrong layout.
He may do this because he may want to indent all the lines except the first one for every bullet point.

This HTML looks fine in outlook but when I test it on yahoo and gmail, it has problems.

Does this makes sense to you ?

Redferret, 3 years ago

What version of Outlook have you tested on? Negative values wont work in Outlook 2007+.

I would also advise not to manipulate the indent on bullet points and use a table for this instead


Gmail app apologist
writetonsharma, 3 years ago

Hi Redferret!!

If you read my second comment, you would know that I am not creating the HTML. Its the user who creates the layout and the HTML driver generate the code. The driver does exactly what the user creates in the GUI.
I was not sure if -ve indents work in email clients or not. Now that you are saying that they don't work, I will code some workaround in the driver.

Thanks for looking at it.

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098