question

yusuf2 avatar image
0 Votes"
yusuf2 asked yusuf2 edited

Convert CSS to Image


Hi
I am using htmlrenderer.WinForms to save CSS as Image

Convert CSS to image in C#


CSS code

      .bg{

background-image: linear-gradient(90deg, rgb(235, 216, 9),rgb(202, 60, 134));
}


but CSS not showing in image just white color.



dotnet-csharpdotnet-cli
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Castorix31 avatar image
1 Vote"
Castorix31 answered yusuf2 edited

It works if I add at the beginning of the HTML source : (remove space after < (I cannot copy-paste correctly...))

< meta http-equiv="X-UA-Compatible" content="IE=edge">

129156-css-in-webbrowser.jpg



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you so much, you solved my issue.
I tried to insert the entire code, but I was getting a error page: access denied

0 Votes 0 ·