Referring .htc file from CSS in ASP.NET - css

I am trying to add a htc file in css. The solution structure is:
I am in /Styles/QTip/jquery.qtip.css and from there I am referring the PIE.htc as:
behavior: url('../HTC/PIE.htc');
But it is not working.
Also after running the application from VS2010 if I browse
http://localhost:2873/Styles/QTip/jquery.qtip.css
Then browser opens the css file but if I browse the URL
http://localhost:2873/Styles/HTC/PIE.htc
I am getting The resource cannot be found.
What will be the right path of this htc file?

You have to use an absolute path or a full URL reference as suggested here and here.

You need to go up another folder...
behavior: url('../HTC/PIE/PIE.htc');

Related

Hugo not rendering the public folder locally

When I use the command hugo, it generates the index.html in the Public folder. When I open index.html, the site load like this:
But when I use the hugo serve command locally, it generates the link http://localhost:1313/, and the site load properly. It loads like this:
I think the problem is because of the not proper rendering of files or anything similar.
My approach:
I added the code relativeURLs = true and uglyURLs = true at top of the config.toml file but still it does not rendered properly.
I had set baseurl = "/" in config.toml file but this also does not work.
Your theme might be loading CSS using {{ .Site.Baseurl }}.
For example:
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/style.css">
In that case, make sure that the BaseUrl defined at the top of your config.toml file is set to http://localhost:1313, which will allow your local server to find the CSS file.
You're CSS file is not loading properly. This can have several reasons, for example:
http url on an https website.
wrong "integrity" hashes on you css file.
css file is not deployed or not on same location on the server.
Google developer tools plugin might help here. If you right click on your web page, click "inspect" and go to console. You can see any loading errors.
You can install Web Server for Chrome and choose the /public folder of your Hugo website. Your site should now render correctly at the url configured (http://127.0.0.1:8887 in the example screenshot).
You might want to set baseURL to the absolute path of the public folder.
Fixed this by configuring baseUrl in config.toml.
If you're deploying using GitHub pages, you'll want to make your baseUrl equal to your github pages domain.

Images and fonts not found (404) on a local web page

This is driving me nuts. This is should be simple - but I can't tell what I am doing wrong.
I have a plain old web site. Index.html, a css folder, images folder, fonts folder and js folder.
I am trying to add a font through the #font-face declaration.
I run the page locally and I get 404s for both the font file and the background image?
The paths are correct?
You are pointing to the wrong directory.
Try to add /../ before your path. Like:
src: url(/../fonts/in901xk.ttf)
This give an "step back" to the main directory and now can point to the "fonts" folder.
Other option to check this, for example in the case of images, is write the complete url that you think is the correct.If you can see the image, you will know what is the correct path that you should use in your src

Why is Windows Azure adding '/bundles/' into all of my css image file paths?

I am using the css property:
background-image: url(/Content/Images/background.jpg);
However when deployed to Windows Azure, it comes up with the file not found error because it is trying to retrieve the image from:
...azurewebsites.net/bundles/Content/Images/background.jpg
I have tried:
'~/', '../', 'Content/', '/Content' & even the full path.
when I simply go to the url of the image in the web browser, it loads the image so I know it is there.
What is the best way to remove or account for this problem?
Thanks.
Why is Windows Azure adding '/bundles/' into all of my css image file paths?
Your CSS file is getting bundled. ASP.NET is putting your CSS file into a new file and storing it at mydomain.net/bundles/somefile.css. The web browser is looking for your image relative to the CSS files location.
This is only happening on Azure because bundling only runs in release configuration not in debug configuration. So, you can test bundling locally by setting <compilation debug="false" /> in your web.config file.
What is the best way to remove ... this problem?
Take a look at this: MVC4 StyleBundle not resolving images and this MVC cannot display image using background-url in css - uses bundling, or just do not use bundling. :)

external CSS sheet not loading to hosting

I'm having trouble making my CSS external stylesheet work in my actual hosting. It all works fine when I open the files from my Finder (I'm using a mac), but the stylesheet does not seem to load to my server properly. All other html files load fine and are visible when you visit my website in any browser,this is my website and the File Manager on my cPanel indicates that the CSS folder and external stylesheet file have been successfully uploaded for enough time that the style features should display. I tried clearing my browsing history and reopening my browser.
My link tag is and I have tried it using aswell as with just "css/socialpolarities.css". I've checked to make sure the spelling is right on the path and corresponds to the actual file.
Is the answer to just put all the style files in the public_html folder and then just change the path on all my html files? Or am I missing something?
I'm also using LiquidWeb if that means anything
The file css/socialpolarities.css seems to exist, but is void of content.
try looking at your local file to make sure it is indeed the one with the css code, then upload it to the same folder and override the original one.
You may have had an upload error.
I got it! The problem was actually that I needed to put the css file in the home directory, for some strange reason. My path from my html files definitely specified that the css files were in a css directory so I'm not sure if it's something I did wrong or whether the cPanel just sucks. Regardless, it works so I won't mess with it. Now time to copy all of my webfont files into my home directory...this is going to be messy lol.
Check your permission. They should be 755. You can search about permissions on internet. I changed the permissions and it worked fine.

CSS file not applied in different versions?

I have a problem with CSS file, if I browse my application via another machine or through published folder , the CSS file is not getting applied but the same CSS file works fine in machine where the application is set up. The CSS file is not compatible with IE6,IE7, IE9 and firefox. Please let me know how to make it compatiable in all versions.
use relative paths for the css files

Resources