PDA

View Full Version : CSS resource



abrsti
22 Mar 2014, 5:38 AM
Hi!

I'm trying to add a simple css to a panel, but no matter what I do I can't get this to work. :((
I enter the name "box" in the CLS field for MyPanel. And use this name in my CSS file.
What have I missed?

48412
Panel code:

48413

Box.css:
48414

Please help.

palakurthivishal
24 Mar 2014, 2:04 AM
Are you sure that you've included the css file from which you want to pickup the css class? Generally in index.html..

abrsti
24 Mar 2014, 2:07 AM
No I haven't. :"> Can you please tell me how. To I have to edit the index.html manually or i there some other ways in Architect?

palakurthivishal
24 Mar 2014, 2:11 AM
I never used architect, but you can do it manually by placing this line <head> of index.html file.
<link rel="stylesheet" type="text/css" href="resources/css/box.css">
relative path to your box.css file..

abrsti
24 Mar 2014, 2:11 AM
Thanks! I will give it a try :D

abrsti
24 Mar 2014, 2:58 AM
Unfortunately it didn't work. But you leaded me to the solution anyway :) I looked at the examples under Sencha Touch folder. And i found that the CSS file was referred to in the app.json and not index.html. And there I noticed that the path was wrong.Its was \\resources\css\box.css, changed it to resources/css/box.css and vol la it works! :)The only thing that is a little bit bothersome is that the CSS is not rendered in Architect. You have to preview the app in a web browser to see the changes.