Hi Jan.
What I discovered in reading phoca font topics in this forum is that you insist always on checking if the template css does not override font with font-family attributes in CSS used by Phoca font.
My question:
1-How to check if my template css does not override font with font-family attributes in CSS?
2-How to fix that?
template css does not override font with font-family attribu
-
- Phoca Member
- Posts: 14
- Joined: 17 Dec 2008, 11:36
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: template css does not override font with font-family att
Hi,
Phoca Font sets a link to the font and sets CSS rules for it. But it does it per Joomla! rules, so Joomla! then adds the code by its priority and the highest priority has the template output.
So the CSS which is loaded as last is valid, latest loaded CSS can overwrite rules of CSS which was set before. So if Phoca Font and Joomla! will set the font and set the rules for it (e. g. that header will use this font) and then template will load own CSS and own font and own rules, Phoca Font rules then will be overwritten.
How to check it - see html of your site, you will see the code of your selected font (set in Phoca Font) and if there will be similar code loaded after then it is possible, that template overwrite the rules
How to fix it - just remove the loading or setting of the rules in index.php of the template (allways search for the font name so you can find the part of code which is responsible for loading the css)
Jan
Phoca Font sets a link to the font and sets CSS rules for it. But it does it per Joomla! rules, so Joomla! then adds the code by its priority and the highest priority has the template output.
So the CSS which is loaded as last is valid, latest loaded CSS can overwrite rules of CSS which was set before. So if Phoca Font and Joomla! will set the font and set the rules for it (e. g. that header will use this font) and then template will load own CSS and own font and own rules, Phoca Font rules then will be overwritten.
How to check it - see html of your site, you will see the code of your selected font (set in Phoca Font) and if there will be similar code loaded after then it is possible, that template overwrite the rules
How to fix it - just remove the loading or setting of the rules in index.php of the template (allways search for the font name so you can find the part of code which is responsible for loading the css)
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 14
- Joined: 17 Dec 2008, 11:36
Re: template css does not override font with font-family att
Hi Jan,
Thank you for your cooperation.
I have followed the steps you provided me in your reply and in seems that it works, but only in Firefox and not in Chrome and Opera.
Why?
Thank you for your cooperation.
I have followed the steps you provided me in your reply and in seems that it works, but only in Firefox and not in Chrome and Opera.
Why?
-
- Phoca Newbie
- Posts: 5
- Joined: 21 Jul 2011, 21:01
Re: template css does not override font with font-family att
Hi Jan!
Sorry for my bad english! ;(
I have a Template installed, that doesnt aply my Phoca Font that i will use (the standard Fonts which i can download on phoca).
Can u help me please!
Above is the code from the index.php from the root
I cant send you here the code from the index.php from the template.
Too many characters.
Sorry for my bad english! ;(
I have a Template installed, that doesnt aply my Phoca Font that i will use (the standard Fonts which i can download on phoca).
Can u help me please!
Above is the code from the index.php from the root
Code: Select all
<?php
/**
* @package Joomla.Site
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
if (version_compare(PHP_VERSION, '5.3.10', '<'))
{
die('Your host needs to use PHP 5.3.10 or higher to run this version of Joomla!');
}
/**
* Constant that is checked in included files to prevent direct access.
* define() is used in the installation folder rather than "const" to not error for PHP 5.2 and lower
*/
define('_JEXEC', 1);
if (file_exists(__DIR__ . '/defines.php'))
{
include_once __DIR__ . '/defines.php';
}
if (!defined('_JDEFINES'))
{
define('JPATH_BASE', __DIR__);
require_once JPATH_BASE . '/includes/defines.php';
}
require_once JPATH_BASE . '/includes/framework.php';
// Mark afterLoad in the profiler.
JDEBUG ? $_PROFILER->mark('afterLoad') : null;
// Instantiate the application.
$app = JFactory::getApplication('site');
// Execute the application.
$app->execute();
Too many characters.
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: template css does not override font with font-family att
Hi, there is mostly only one reason why the font is not displayed (when we are speaking about templates) and it is that the template defines the font for specific parts of the code, so look into your template css where the font-family is defined and try to disable it if it is defined for specific tags, classes, etc.
Jan
Jan
If you find Phoca extensions useful, please support the project