April 26, 201312 yr I have a CSS Gradient in a Web Viewer. It works great on all web browsers except IE10. It will not display if IE10 is installed. Here is the code in the web viewer: "data:text/html," & "<style>body { border: 0; margin: 1; background: -webkit-linear-gradient(top, #16517c 0%,#174a74 100%); background: -ms-linear-gradient(top, #16517c 0%,#174a74 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#16517c', endColorstr='#174a74',GradientType=0 ); } </style>" If I use the same code in an html page it displays in IE10. I just will not display in the web viewer. Here is the code for an html page: <html> <head> <style>body { border: 0; margin: 1; background: -webkit-linear-gradient(top, #16517c 0%,#174a74 100%); background: -ms-linear-gradient(top, #16517c 0%,#174a74 100%); background: linear-gradient(to bottom, #16517c 0%,#174a74 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#16517c', endColorstr='#174a74',GradientType=0 ); }</style> </head> <body> </body> </html> I would really appreciate any help.
April 27, 201312 yr So why the difference between the web viewer code and the other code? Of course it doesn't display anything. You didn't tell it to display anything. There is no html, head, or body part in your web viewer code.
April 27, 201312 yr To be more explicit, the web viewer code should be: "data:text/html," & "<html> <head><style>body { border: 0; margin: 1;background: -webkit-linear-gradient(top, #16517c 0%,#174a74 100%); background: -ms-linear-gradient(top, #16517c 0%,#174a74 100%); background: linear-gradient(to bottom, #16517c 0%,#174a74 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#16517c', endColorstr='#174a74',GradientType=0 ); }</style></head><body></body></html>"
November 4, 201312 yr Author The web browser does not care if you have <html>, <head>, or <body> All web browsers will take any text that is given to it and views it as HTML
November 4, 201312 yr In this case... You have applied a style to a html tag called body. You have not actually put a tag called body in the web viewer code. Therefore the style cannot be applied, irrespective of actually writing standards compliant code....
Create an account or sign in to comment