CSS3 PIE Forums
http://css3pie.com/forum/

Very strange background color behavior
http://css3pie.com/forum/viewtopic.php?f=3&t=3099
Page 1 of 1

Author:  rsutton [ Wed Jan 29, 2014 10:33 am ]
Post subject:  Very strange background color behavior

I have encountered a very strange behavior. I am using PIE (current release) to round some corners on a <div>. I am testing this on an xp machine (fully up to date) with ie 8. What I have found is that if I use the 'background: lightgray' in the css then I get a rounded corner black background div. If I change the background statement to the color equivalent #d3d3d3 the I get a lightgray rounded corner div (just like I wanted).

I know it sounds crazy, but I have made a little test case that demonstrates this behavior:

<!DOCTYPE html>
<html lang="en">
<head>
<title>Test Case</title>
<meta charset="utf-8" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<style type="text/css">
#main {
width: 20em;
height: 10em;
padding: 2em;
color: black;
background: lightgray;
border-radius: 7px;
behavior: url("/js/pie.htc");
}
</style>
</head>
<body>

<div id="main">
<p>lorum ipsum...</p>
</div>

</body>
</html>

I have my PIE.htc in /js but you can place yours wherever. I am stumped as to why this is so. Does anyone have any ideas? Does PIE not recognize certain colors?

Thanks in advance ...

Author:  Johna [ Wed Jan 29, 2014 12:24 pm ]
Post subject:  Re: Very strange background color behavior

I tested this in IE8 also - worked fine either way.
But I could not get to work in the js folder.
Try putting the pie.htc in your root folder and change your url('yourURL')

Author:  rsutton [ Wed Jan 29, 2014 1:41 pm ]
Post subject:  Re: Very strange background color behavior

Johna, thanks for the reply. I tried it in the root directory and I still get the same results. I should have mentioned that I am using an Apache web server (also fully up to date).

I also tried just double-clicking the file (without benefit of a web server) and I get a gray div but it seems to ignore the border-radius completely. Are you using a 'real' ie 8, or are you using an 'emulated' ie 8? I am using a real ie 8 on XP SP3.

Author:  jason [ Wed Feb 05, 2014 1:32 am ]
Post subject:  Re: Very strange background color behavior

Looks like we have the color keyword 'lightgrey' mapped to a hex value, but not 'lightgray'. Should be an easy addition. Feel free to submit a fix in Github, or just avoid using the unmapped keyword.

Author:  rsutton [ Wed Feb 05, 2014 4:25 pm ]
Post subject:  Re: Very strange background color behavior

Thanks Jason, I was pretty sure that the issue was in PIE but as you suggested - the workaround is to use the hex value. I'm not sure if patching it is worth the effort when there are more interesting things to code...

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/