Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4036 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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.

Posted

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>"

  • 6 months later...
Posted

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

Posted

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....

This topic is 4036 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.