My Foundation Icons are not working in Firefox. Only letters in a box display instead - firefox

The Html
<link rel=stylesheet href=../static/css/foundation-icons/foundation-icons.css>
<a class="button radius search-header"><i class="fi-magnifying-glass"></i> Search</a>
I have navigated to foundation-icons.css after hitting Ctrl+U within Firefox so I am definitely linking to the file correctly.
I have copied the foundation-icons folder exactly and not removed anything. It looks like this:
./static/css/foundation-icons/
- foundation-icons.css
- foundation-icons.eot
- foundation-icons.svg
- foundation-icons.ttf
- foundation-icons.woff
- svgs/*
- preview.html
Edit: I have changed the title and added the Firefox tag because everything seems to be working fine in Chromium. I am a little stumped because that means it's a Firefox issue and probably not possible for me to fix.
The preview.html file that comes with foundation-icons works correctly in my Firefox as well.

If you're using the SCSS files, you should point the $fi-path variable to the correct location of your foundation-icon-fonts folder.
For me I had to add the following before importing foundation-icon-fonts:
$fi-path: 'foundation-icon-fonts';

First correct this:
<link rel="stylesheet" href="../static/css/foundation-icons/foundation-icons.css">
In examples of Foundation, Firefox use .woff files. Check if you have access to them.
It's a relative path. Are you sure 'static' folder is reachable with your browser ?

Related

how to replace the xampp favicon with my own one?

trying to edit the xampp favicon but coudn't do that so revomed them. now my webpages don't even have xampp favicon and i'm unable to add my own icon.can someone walk me through the whole process that really works. if can't then just teach me how to add an icon on a real server where my site soon going to b hosted? Thanks!
just add the code bellow to your file.
<head>
<link rel="icon" href="images/favicon.ico" type="image/ico">
</head>
I think that this will work for you.
Just go to C:\xampp\htdocs and delete the favicon.ico file (if it is there).
Insert the image file in that folder. (Remember that it should be an ico type file)
Now rename that image as 'favicon' and it will be done.
Adding an icon named favicon.ico in your document root should solve the problem
Sometimes, even after you changed the favicon.ico file, the browser still cached the old favicon.
You need to do CTRL+F5 on the browser to reload the page.

js and css filename being corrupted on publish with VS2013

I am publishing my Web App using the VS2013 publish mechanism. For some reason it has just started corrupting the js and css filenames. e.g.
From
<link href="/Content/bootstrap.css" rel="stylesheet"/>
To
<link href="/Content/css?v=puREEettBuwGkRK7y27hOQwXg4qvcAYRnG8wxc0gvnU1" rel="stylesheet"/>
This is only happening on publish to the live site. It works fine on publish to the localhost site. It looks like possibly some kind of versioning.
The defined bundles in BundleConfig are not being expanded, instead parsed with the above result.
Any ideas? I have not seen it before and its not showing up on Google searches. Thanks for any suggestions.
ANSWER:
For anyone else getting this problem - Once I realised it was the Bundles I found this which gave a lots of thoughts. However my specific issue was that I had installed Select2 via NuGet which had added a css directory in Content. As I was creating a Bundle pointing at Content\css these clashed. I removed the css directory and republished. Still didn't work. But when I removed that directory on the server manually it all started working again.

Change image icon in addressbar of browser

I searched through many sites, but I failed to get an answer.
Question :
I want to change icon as per given in below image in my browser.
Currently chrome and Mozilla does not support this feature if you want check you can check it in either ie or safari, it will show where you want.
you should add this tag to head
<link rel="shortcut icon" href="<YOUR ICON PATH>">
this is a tool to help you to create icon using converter
http://www.favicongenerator.com/
Those are called "favicons", and you can set one for your website using a special tag in the HEAD of your HTML. You can find many tutorials on this by Googling (now that you know what they're called).
Wikipedia suggests a tag something like this:
<link rel="shortcut icon" href="http://example.com/myicon.ico" />
As an alternative, your website can provide an image named favicon.ico in the root folder.
That icon names "favicon". To create Something like that go to THIS LINK, Upload an image and get the favicon.ico file, then put it next to your template page on your host.
To get more information go HERE.

Font awesome not displaying properly on Firefox

I am trying to use a font awesome icon in a widget that is installed on a customers website. The font awesome icons displays correctly in Safari and Chrome but doesnt in Firefox. However, it still displays correctly in Firefox when previewing it on our site. Does this have something to do with how Firefox displays third party fonts across domains?
Any ideas would be greatly appreciated. Thanks.
Note: This was tested using Firefox V9 and above.
Firefox only allows cross-domain linking of fonts if the server the font is on sends the right CORS headers. And it does this because the spec very clearly says to do it, at http://dev.w3.org/csswg/css3-fonts/#default-same-origin-restriction
I notice a strange behaviour, probably related to the firefox security policies.
I had the same problems with a project configuration like so:
/site/html <--- where all the .html files go
/site/resources/... <--- where all the css, font, img, js stuff goes
now, I included the font-awesome.min.css in an html file located under the /site/html directory and I experimented your problem.
But when you download the Font Awesome package it is shipped with html demo files that actually works in firefox. What's the trick?!
Their project structure has the "resources" folder (they call it "assets") nested inside the "html" folder. This seems to calm down the firefox security policy.
Finally, my answer is: get a configuration like the following
/site/html <--- where all the .html files go
/site/html/resources/... <--- where all the css, font, img, js stuff goes
it worked for me.
If you are hosting your font on S3, you have to enable CORS on the bucket. See my answer to this other question for details
MaxCDN identified and fix this issue. They set the right CORS headers and embedding this line to your website should work:
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
Firefox blocks Cross-Origin Request.
Firefox disallows reading the remote resource due to Same Origin Policy for below CDN:
https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css
I dug little to fix CORS issue instead I replaced above CDN with below one and icons rendering fine:
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.1.0/css/font-awesome.min.css" media="all" rel="stylesheet" type="text/css">
Use direct link for including css files , also make sure you don't get a cross-domain error in the debugging console .
For example when you access your website from :
http://www.domain.tld make sure you link css file from the same path including www
like so : http://www.domain.tld/css/style.css
and when you access from http:// > link css files also from that very same path without www.
http://domain.tld/css/style.css
i got that issue some time ago and it was fixed by modifying css paths to request css files from the "same" web address / path .
example:
you can view font awesome icons in this path
http://webake.ro/
But not in this one :
http://www.webake.ro/
because the font was linked from within http://domain.tld path without adding www. in the
link href=
Font from origin 'http://webake.ro' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.webake.ro' is therefore not allowed access.
Turn your fonts into base64 and include through CSS. This way you push the fonts through the browser code and the font files are not downloaded in the usual fashion needing cross domain permissions. This is also a DISA STIG issue to disable downloadable fonts but probably not your issue here. The solution can be seen at this post and also copied here:
You just need to Base64 the font and include it in a CSS file. Make sure to remove your call to the downloadable WOFF file once you include the call to the new FontAwesomeB64.css
Use https://www.base64encode.org/ to encode the WOFF Font-Awesome font file.
Edit the the resulting file and add these lines. When you get to the src:url line, make sure to run that right into the base64 information you received (don't use the greater than and less than signs I show here.) At the end of that base64 information add the single quote, parentheses, a semi-colon, and curly brace to finish:
#font-face {
font-weight: 400;
font-style: normal;
font-family: 'FontAwesome';
src:url(data:application/x-font-woff;base64,<insert base64 code here>);}
You now have a base64 CSS file of the Font-Awesome font that bypasses all font download denial settings in browsers.
I've found that this works with all fonts, a little heavier on the download but worth the guarantee of functionality.
#font-face{font-family:'FontAwesome-webfont';
trust me, this really works.

AbcPdf - document not applying CSS

This may be more of a tech support issue, but I'm wondering if any other developers have come across this:
I'm using Abcpdf in my ASP.NET code to generate a PDF from HTML. It works fine, but one user is generating PDFs that don't have the CSS applied (IE8, Adobe Acrobat latest version - same as everyone else). Since this is the only user complaining, I'm sure it's a local setting, but I can't figure out what would prevent the css from loading - a browser setting? An Acrobat setting?
Does anyone have any suggestions?
Perhaps an issue with different versions of Acrobat reader? I'd look into this.
This doesn't make a lot of sense because AbcPdf uses service side logic to create the PDF based on what methods you are using to create the document (ex. AddImageUrl vs drawing out the document manually, etc.).
For what it's worth the staff at WebSuperGoo (the vendor of AbcPdf) is great with replying to support questions such as this. I've run across a few edge cases with their product that they've always followed up with workarounds or alternatives to address in a timely manner.
make sure you have media="print" for the CSS style sheet! Just spent ages looking at this pulling my hair out and was about to email WebSuperGoo then that thought came to me.
just about to back out all the changes I've made to my code and test again but it looks like with EngineType.Gecko it needs to be media="print" where as with EngineType.MSHtml it can be media="screen".....
very odd but hope that helps someone!
Make sure that the CSS is an absolute URL rather than relative, or add a base tag to the header of the HTML
For example, rather than
<style type="text/css" href="/styles/somecss.css" rel="stylesheet" />
use
<style type="text/css" href="http://myserver.com/styles/somecss.css" rel="stylesheet" />
Also if you site is SSL or authenticated then you will have to either make the area with the stylesheet un-authenticated, or, set the password and username attributes of the PDF object so that ABCPdf can authenticate
You can try the following in version 9
doc.HtmlOptions.PageLoadMethod =
PageLoadMethodType.WebBrowserNavigate;
I am using Version 10 of ABCpdf and I found that the style sheet path should be absolute instead of relative.
I changed the stylesheet path from "C:\MyProject\Resources\Styles.css" to "http:\www.MyDomain.com\Resources\Styles.css" and it worked.
Although, version 6 seems to be working with relative paths. I didnot check it with other versions
As per WebSuperGoo support:
(Query # : 6.17)
HTML does not exist within a file and so it does not have a location.
External stylesheets and images are often referenced via relative URLs. Because the HTML has no location it is impossible to resolve
these relative references.
So you need to provide your stylesheet and image links as absolute references. Or you may be able to use the HTML BASE element to specify
an appropriate base location. Or you can save your HTML to file in an
appropriate location and then use AddImageUrl.
Have you tried;
theDoc.HtmlOptions.DoMarkup = true;
This forces the engine to process the HTML before rendering.

Resources