Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 9    Views: 87

Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
06/24/13 04:01 PM (12 years ago)

HTML Doc Plugin Not Loading CSS

Hi All, I am trying to use the HTML Doc to load an html page which has jquery and css. In the custom URL plugin, it loads fine (on my website), under the HTML doc plugin, it does not work. Any ideas? (All files are in the same folder, no other directories) Jake
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
06/24/13 04:05 PM (12 years ago)
iOS or Android? Are your links relative links and do they omit folder names?
 
Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
like
06/24/13 04:05 PM (12 years ago)
iOS, omit folder names. Jake
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
06/24/13 04:07 PM (12 years ago)
hmm - it should work just fine. Can you paste the css directly into the html document and bypass the need for external css files?
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
06/25/13 01:25 AM (12 years ago)
Hi Jake. I just opened up an app in xcode that I put together a little while ago to remember how I did it. In my app, the html files reside in the root of BT_Docs as does the css. The stylesheet link in the app is href="myapp.css". That works. In another app I have a sub directory called css and the stylesheet link in the app is href="css/myapp.css". That works too. Any images that the css references need to live in BT_Docs too. So, long story short, as Chris said, it should work, there is probably a small syntax error somewhere. Hope that helps, Alan
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
06/25/13 02:01 AM (12 years ago)
Jake if you get this working let me know as I have been trying for months and cannot get my docs to pick up the CSS in my xcode project.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
06/25/13 02:12 AM (12 years ago)
Hi @Dragon007, did you spot the direct messages I sent in response to your jquery question recently? This issue may be similar I just noticed in my xcode project folder that the css folder is blue; xcode treats it slightly differently and doesn't try to compile it.
 
Ed
Apple Fan
Profile
Posts: 6
Reg: Jul 05, 2012
Wellington
4,010
like
08/21/13 07:29 PM (12 years ago)
Hi first post so I hope I'm not too far off track here. I had the same problem, custom URL fine, and HTML Doc missing the styling and rendering as plain text. But I found the solution by using inline styling. Works fine. For a quick fix try http://premailer.dialect.ca/ there you can give your URL and it spits out HTML which uses no external CSS - it's all inline. I normally use this for quick HTML emails but it works fine. I simply duplicated my HTML page say about.html to aboutapp.html, ran it through premailer, copied the html and pasted it into the aboutapp.html. Hey presto! Hope that helps, and hope I'm not too far off track.
 
Ed
Apple Fan
Profile
Posts: 6
Reg: Jul 05, 2012
Wellington
4,010
like
08/21/13 07:32 PM (12 years ago)
Oops posted twice somehow.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
08/22/13 12:55 AM (12 years ago)
Nice one Ed. It appears there are some scenario's where external references to CSS doesn't work as expected when using html in a BT app. Using in-line CSS takes out the external references.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.