My CSS's wont apply to my application rendered through zappa\express\node.js - css

A copy of my code is here
http://pastebin.com/jcLRCrQr
Everything loads fine and the CCS sheets resolve, the javascript\coffescript files load and work correctly, however the styles fail to apply
a wierd thing is when i access the css files directly i.e /lib/css/bootstrap.css
they do not come out formatted, infact its as if all the whitespace has been stripped out.
I have tried this in firefox and chromium and get the same issue.
any help would be greatly appreciated.

Ok i figured it out , thanks to all that had a go.
the content type had to be set on the response for each .css file
i.e res.contentType "css"

Related

CSS not displayed on GitHub Pages?

I need help regarding a mini project I'm working on. It's a simple site and it does not do any much yet. But when I push it on Git, CSS seemed to be not working.
Link: https://chxrain.github.io/Mini-School/
I tried changing the href link to the ff and it still doesn't work:
./css/style.css
../css/style.css
./Mini-School/css/style.css
../Mini-School/css/style.css
/css/style.css
/Mini-School/css/style.css
\css\style.css
Big thanks to those who can help!
This is the true link of the logo
Update:
For internal linking of files, the proper way of calling it will be:
/RepositoryName/folder/image.jpg
In my case, it is /Mini-School/media/image.jpg (which is inside the media folder)
CSS link remains as css/style.css (which is inside the css folder)
make sure that your local modification or your css is pushed into git

Browsers ignoring single CSS file

Not sure how to really categorize this question, but on this page, the file http://d1el287zd12c0j.cloudfront.net/assets/hitgrid-0a8239a14fba0de87431c06cd75774f3.css seems to be completely ignored by browsers. It appears to load successfully and no different than any other css file on the page, but the styles in it are simply not applied to the page.
The content-type, encoding and everything appears to be working as expected. Roughly the same content "applies" fine on my local installation of the app.
I'm at a loss as to what's going on here.
I just check it out and everything went right.
Try to make the filename shorter in the CDN. Large names tend to make error in some way or maybe check if no other stylesheet is interfering with the styles
If that didn't work, answer these questions and Ill try to git it a try again
Which OS are you using?
2. Are you using wordpress?

Can Access CSS File By URL, But Not From HTML

I have a Spring App with ThymeLeaf and Dojo that is causing me a problem. The CSS files are showing up aborted in Firebug when I reference them from my HTML file. However, when I go directly to the file by putting a copy of the CSS URL in the address bar, it works. In addition, the Dojo code works, but it fails when it gets to the CSS file. So, I have tried a CSS link only and with Dojo and both fail. I have searched this one for hours, but I cannot find anyone else having this problem.
Thanks in advance,
Joe
Figured out the issue. I turned on debug on the server and tested a JS and CSS file. They both behaved the same from the server perspective and it looked like the CSS file was being sent correctly. So, I tried IE and it worked fine. After reinstalling Firefox, the software works as expected. Wish I had figured out this issue earlier

Css not working on published sites

I have just recently implemented the five star rating system from ajax, into my asp.net site. Everything works fine in locall debug mode.However. Once i publish it, the css does not show up. I have declared all of the css within the content page, not sure if this is why. I am very in-experienced with working with css; so i am sorry if it something simple.
I have checked the spelling of the image url, and have also tried implementing it into the site.css. But as i said, i am in-experienced; so am not sure what to do here.
This is my code as it stands:
The css declared at the top of the content page:
http://codepad.org/m1w39Hep
The reference to the css from my rating control:
http://codepad.org/Kl0BKets
Thanks in advance!
Check if your css links is right and your css files loaded successfully
I have seen your code.
Give extention as ".css" and not ".c"
I dont think that you can use Codepad for that because it does not give support for CSS.
If you are not using Codepad
Then as you are deploying it in server then check the URLs of the Images that are present in the CSS file for rating/.

How do I get -moz-binding to work for ellipsis with data:text/xml?

We have a lot of elements on the project I am working on that use ellipsis styles, which, of course, work fine with pure CSS in all major browsers but FireFox. We implemented the -moz-binding fix for that which references the xml file with the binding information for cropping an element defined with XUL/XBL as defined here and it worked great... Until we decided to move all our static files (CSS, images, etc) to performance optimized servers. The -moz-bindings no longer worked because FF has disabled XUL from working cross-domain as a security precaution.
I found a lot of references online about putting the binding xml directly into the url clause of the -moz-binding like this:
-moz-binding: url(data:text/xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%3F%3E%3Cbindings%20xmlns%3D%22http%3A//www.mozilla.org/xbl%22%20xmlns%3Axbl%3D%22http%3A//www.mozilla.org/xbl%22%20xmlns%3Axul%3D%22http%3A//www.mozilla.org/keymaster/gatekeeper/there.is.only.xul%22%3E%09%3Cbinding%20id%3D%22ellipsis%22%3E%3Ccontent%3E%3Cxul%3Adescription%20crop%3D%22end%22%20xbl%3Ainherits%3D%22value%3Dxbl%3Atext%22%3E%3Cchildren/%3E%3C/xul%3Adescription%3E%3C/content%3E%3C/binding%3E%3C/bindings%3E);
But that didn't work... the binding just fails and the element does not display at all in the browser. No error (that I can figure out how to capture at least) is thrown and so I can't diagnose what's going on.
I thought maybe it was just the way I encoded the xml but even trying the sample on the Mozilla documentation or this other sample doesn't work for me. I have tried simple html pages with nothing but an element with the Mozilla example and it fails. What is it I am missing configuration-wise to make this inline stuff work?
I am either looking for 1) a way to make the inline -moz-binding work or 2) a way to resolve it so that the external xml file works when the CSS is coming from another domain.
If anyone has advice it is much appreciated!
By the way, I'm not interested in any other solutions in applying ellipsis to fields (such as Javascript implmentations). This works fine for our purposes and is used too many places in the site as a CSS class to make a refactoring for another approach feasible.
You could try that adding in your .htaccess:
Header set Access-Control-Allow-Origin *
source

Resources