Forums
View unanswered posts | View active topics It is currently Fri Oct 31, 2014 1:02 am



Reply to topic  [ 5 posts ] 
 Very strange background color behavior 
Author Message

Joined: Tue May 17, 2011 1:35 pm
Posts: 27
Post 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 ...


Wed Jan 29, 2014 10:33 am
Profile

Joined: Wed Dec 11, 2013 7:51 am
Posts: 4
Post 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')


Wed Jan 29, 2014 12:24 pm
Profile

Joined: Tue May 17, 2011 1:35 pm
Posts: 27
Post 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.


Wed Jan 29, 2014 1:41 pm
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1446
Post 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.


Wed Feb 05, 2014 1:32 am
Profile

Joined: Tue May 17, 2011 1:35 pm
Posts: 27
Post 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...


Wed Feb 05, 2014 4:25 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.