Solved

CSS Gradient Not showing in Safari

Posted on 2011-03-07
4
774 Views
Last Modified: 2012-06-27
Hello

I have the following code from Jquery Mobile whch is not rendering the gradient properly in Safari. Can you provide some help with whats missing?
.ui-bar-a {
	border: 1px solid #2A2A2A;
	background: 			#111111 url('-webkit-gradient(linear,left%20top,left%20bottom,%20color-stop(0,%20#3c3c3c))');
	color: 					#ffffff;
	font-weight: bold;
	text-shadow: 0 -1px 1px #000000;
	background-image: -moz-linear-gradient(top, #3c3c3c, #111111);
	-msfilter:progid:DXImageTransform.Microsoft.gradient(startColorStr=#3c3c3c, EndColorStr=#111111); background-image:url('-webkit-gradient(linear,left%20top,left%20bottom,%20color-stop(0,%20#3c3c3c')
}

Open in new window

0
Comment
Question by:jfergy
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:jtwcs
Comment Utility
Have a look at this site for help with gradients, http://webdesignerwall.com/tutorials/cross-browser-css-gradient

0
 

Author Comment

by:jfergy
Comment Utility
Unfortunately that doesn't help. I have tried that style and many others with the jquery mobile code I posted in questions and still shows flat. Obviously missing something but not sure what it is. If you have other ideas regarding the code posted specifically Im all ears.
0
 
LVL 10

Accepted Solution

by:
jtwcs earned 125 total points
Comment Utility
Do you have a link to the page/site?

Just going by the code above, you may not be declaring the gradient correctly.  Have you tried this?

background: #111111;
background: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#111111)); /* for webkit browsers */

Another option would be to use an image for the gradient.
0
 

Author Comment

by:jfergy
Comment Utility
It must be something to do with the JS for the mobile and not the CSS. If I try this outside the jquery framework its fine. But then again Jquery Mobile is in beta.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now