Terrence Brannon
Terrence Brannon

Reputation: 4968

jquery mobile css file loads remotely but not locally

As you can see, this jquery mobile app, loads and renders the CSS just fine with this line in the main index.html -

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" />

However attempting load it as follows:

<link rel="stylesheet" href="jquery.mobile-1.0a4.1.min.css" />

fails, even though the file is right there in the root directory since the webapp is a direct checkout of my github repository.

Upvotes: 2

Views: 1937

Answers (3)

Phill Pafford
Phill Pafford

Reputation: 85318

Your CSS link looks fine. Looking over your repo I did notice the images directory the jQM uses to display icons and such is missing. This could be the problem you're looking for.

If you look in the css for .png you will see the missing images.

Here is what some of them look like: http://code.jquery.com/mobile/1.0a4.1/images/icons-18-white.png (middle top)

Upvotes: 0

Jason Gennaro
Jason Gennaro

Reputation: 34855

I may be looking in the wrong spot, but when I open the .css file in your github repository, I see minified jquery code. Perhaps you saved over the css?

Upvotes: 2

dtbarne
dtbarne

Reputation: 8200

You said it's in your root directory? Try an absolute path. Also, you should be using type="text/css".

<link type="text/css" rel="stylesheet" href="/jquery.mobile-1.0a4.1.min.css" />

Upvotes: 2

Related Questions