have a strange one! When working with my Laravel 5 app using font awesome, every icon shows up as it should when I am running locally with debug set to on.
When I turn off APP_DEBUG and set to false, one of my font awesome icons just does not show!? Very odd - any ideas?
Thanks!
There is probably something weird with the href of the fontawesome css link tag. Check your url or just use a cdn such as:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
Related
hi i have this problem with my sass file i try to change background color in the Variables file but nothing change
note the bootstrap apply with no problem, a success message popup also !!!
sass code
you need to be sure that your scss file compiled correctly. check output css file and compare them together.
if it is not compiled successfully you need to ask another question. but if it looks OK then you need to fully refresh your page (ctrl+f5). because of browser cache system.
it is a good practice to insert your css files in this way :
<link rel="stylesheet" type="text/css" href="path2cssfile/your-css.css?update={{ filemtime('path2cssfile/your-css.css') }}" />
this will force browsers to reload the new compiled files.
can you please instruct me on how to add custom fonts to my rails 5 application? i've added my custom fonts files to fonts folder in app/assets. i went on to use the #fontface and font-url in .scss, but my fonts wont take effect after before and[enter image description here pushing to heroku.
enter image description here
I suggest you go modify your application.html and add the fonts there. I don't know what you are trying to do but adding a simple
<link href="fonts.googleapis.com/css?family=Roboto"; rel="stylesheet">
In your header might be enough.
I'm having a weird problem with Laravel application which has been at Linux Server previously and was working fantastic but while moving to a new IIS Server, I faced alot of problems and the last problem here is some problems in view, while css and JS files are loaded and there is no error in console.
I have posted this question previously, now I'm re-posting it again with more details.
e.g. In local and previous host the fonts are good and everything works correctly, but in IIS server the fonts are bigger than normal and in local and previous server,The Pop Ups are Shown and the fonts are fine As shown in this photo, but, in IIS server, The background gets dark but the popup is not shown and the fonts are bigger Like this photo.
When I check it via Inspect elements from Chrome no error is there and all CSS and JS files are loaded correctly, while everything works but all fonts are bigger and some designs are ruined.
What I have tried:
I tried php artisan dump-autoload and php artisan serve.
Updated the composer.
Cleared the cache.
rewrited the mod and removed index.php from the link.
However, none of them works. I'm loading CSS and JS Files this way: <link rel="stylesheet" href="{{ URL::asset('assets/css/mystyle.css') }}"> and <script src="{{ URL::asset('assets/js/main.js') }}"></script>.
It looks like a very strange and weird problem, I don't know what is wrong while every CSS and JS files as well as every option works fine, but the fonts are bigger, some padding are ignored and some designs are ruined, while in localhost and previous server it was fine.
Can anybody help? and say what is wrong with this?
your problem is not familiar but any way here some tips :
in IIS server you should use URL::secure to connect with assets
post some code so we can find something wrong
use firefox developer edition to find your css problems in production
find the css selectors that effects your font in production
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 ?
is there any general reason for which Font Awesome doesn't show up in IE 10?
Another question - what's the #font-face thing all about? Do I have to use it? I haven't done it so far and it works well in Firefox and Chrome, could that be the reason for IE?
(excuse my ignorance, I'm a complete newbie)
I had the same issue, the actual cause was https secured connection
I was using https protocol changed it to http
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
I Hope it helps
If it is working on other browsers, make sure you are not in compatibility mode or have not accidentally put your site on the compatibility list in IE.
If it doesn't work in others, it has to have 2 classes: fa AND fa-blah (assuming Font Awesome 4.x; Font Awesome 3.x has different notation)
Also, check your developer tools F12 to make sure all the fonts and CSS/JS is loading into the site.