Add a font to joomla

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
nti_na
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Sun Jul 01, 2018 9:18 am

Add a font to joomla

Post by nti_na » Tue Aug 14, 2018 6:38 am

Hi. I am new in joomla and I want to add the didact gothic font (greek) to my joomla web site. I use a template and I tried to add into custom.css file the code:
@import url('https://fonts.googleapis.com/css?family=Didact+Gothic');

body.p{
font-family: 'Didact Gothic', sans-serif;
}
I saved but nothing changed. How can I add the font and all the content in my site have the same font?
Thank you

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30934
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Add a font to joomla

Post by Per Yngve Berg » Tue Aug 14, 2018 6:44 am

See how it's done in the Protostar Template.

SharkyKZ
Joomla! Hero
Joomla! Hero
Posts: 2906
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: Add a font to joomla

Post by SharkyKZ » Tue Aug 14, 2018 7:10 am

Assuming your CSS file is loaded properly, change the selector. body.p applies the style to body element with class p (<body class="p">). If you want this font on all text, use body selector only:

Code: Select all

body{
font-family: 'Didact Gothic', sans-serif;
}


Locked

Return to “Templates for Joomla! 3.x”