MvcMailer icon indicating copy to clipboard operation
MvcMailer copied to clipboard

Css file

Open mihaitibrea opened this issue 11 years ago • 4 comments

Hello, I tried to insert a css file to my mail instead of writing all the css at the end of the cshtml page.

The name of the css is Mail.css and it's in the folder Content/Mail.css i tried using

@Styles.Render("~/Content/css").

And also, in the css file, I am using a small image to display. It is not displayed in the email. background: url("../Images/image.png") no-repeat;

Can you help me in some way ?

mihaitibrea avatar Jul 15 '13 08:07 mihaitibrea

Was anoyone lucky with solving this problem?

Mastanka avatar Jun 22 '15 22:06 Mastanka

You cannot add external style sheets to an email, all css has to be inside the page.

mihaitibrea avatar Jun 22 '15 23:06 mihaitibrea

Ou... And did you find solution how to transform stylesheet reference such ass: @Styles.Render("~/Content/css") to transforming it to include css styles directly into html elements inside email?

Mastanka avatar Jun 22 '15 23:06 Mastanka

http://lmgtfy.com/?q=+inline+css+online

mihaitibrea avatar Jun 22 '15 23:06 mihaitibrea