Forums
View unanswered posts | View active topics It is currently Sun May 19, 2013 7:18 pm



Reply to topic  [ 3 posts ] 
 Gradient not working on particular element (js version) 
Author Message

Joined: Sun Oct 30, 2011 2:57 pm
Posts: 10
Post Gradient not working on particular element (js version)
I have the following web page:
- http://tinyurl.com/7pjeg43

Yet PIE does not seem to be able to apply a background gradient to the following element:

Code:
#twitter h4 {
   background: #a1a9ad; /* Old browsers */
   background: no-repeat 130px center, -moz-linear-gradient(top,  #a1a9ad 0%, #495a62 100%); /* FF3.6+ */
   background: no-repeat 130px center, -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a1a9ad), color-stop(100%,#495a62)); /* Chrome,Safari4+ */
   background: no-repeat 130px center, -webkit-linear-gradient(top,  #a1a9ad 0%,#495a62 100%); /* Chrome10+,Safari5.1+ */
   background: no-repeat 130px center, -o-linear-gradient(top,  #a1a9ad 0%,#495a62 100%); /* Opera 11.10+ */
   background: no-repeat 130px center, -ms-linear-gradient(top,  #a1a9ad 0%,#495a62 100%); /* IE10+ */
   background: no-repeat 130px center, linear-gradient(top,  #a1a9ad 0%,#495a62 100%); /* W3C */
   -pie-background: no-repeat 130px center, linear-gradient(top,  #a1a9ad 0%,#495a62 100%); /* W3C */
   color: #fff;
   font-size: 16px;
   padding: 8px 0 8px 80px;
   font-weight: bold;
   text-shadow: -1px 1px #46575e;
   border: #fff solid 1px;
}


Also here is how I'm calling the script:
Code:
$(document).ready(function() {
    if (window.PIE) {
        $('#frm-search, #frm-search h4, #twitter h4, #frm-search input[type="submit"]').each(function() {
            PIE.attach(this);
        });
    }
});


You can see how the element appears in IE7+8 in the attached image.

I cannot understand why this is the case. My other gradients work fine, and I can't see any incorrect syntax.

Has anyone else had a problem like this?


Attachments:
Screen Shot 2012-01-05 at 11.20.14.png [17.31 KiB]
Not downloaded yet
Thu Jan 05, 2012 5:21 am
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1396
Post Re: Gradient not working on particular element (js version)
I haven't had a chance to try it yet, but the "no-repeat 130px center" in your styles seems a bit odd... since it does not have an image it seems useless, though it shouldn't have any negative effect for sure. But it's possible PIE chokes on that. Can you try removing it and see if that helps?


Thu Jan 05, 2012 12:47 pm
Profile

Joined: Sun Oct 30, 2011 2:57 pm
Posts: 10
Post Re: Gradient not working on particular element (js version)
Oooh that seems to have fixed it, thanks :D

No idea how that code got in there!


Mon Jan 09, 2012 7:27 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: Google [Bot] and 4 guests


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.