Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CSS Gradient Not showing in Safari

Posted on 2011-03-07
4
Medium Priority
?
781 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

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

0
 

Author Comment

by:jfergy
ID: 35111531
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 500 total points
ID: 35112949
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
ID: 35113023
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

718 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