Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / What file do I edit if I would like to add a css link?

What file do I edit if I would like to add a css link?

Views: 680

Results 1 to 3 of 3
16 Apr 2013, 1:08 PM
#1
petergy avatar

petergy

New Zenner

Join Date:
Sep 2012
Posts:
65
Plugin Contributions:
0

What file do I edit if I would like to add a css link?

If I would like to add this line:

<link href='http://fonts.googleapis.com/css?family=Arvo:400,400italic,700,700italic' rel='stylesheet' type='text/css'>

to function throughout my ZC, in what page (file) do I add it to?

Thank you.

16 Apr 2013, 3:52 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: What file do I edit if I would like to add a css link?

Normally to include a stylesheet, you simply save the stylesheet file in your template's /css/ folder (with a name starting with "style"). Obviously you can't do that here, so you could either add a jscript_fontstyle.php file in your template's /jscript/ folder that does the calling, or edit /includes/templates/your_template/common/html_header.php and insert the call in the appropriate sequence.

jscript_fontstyle.php```php

<?php echo '<link href='http://fonts.googleapis.com/css?family=Arvo:400,400italic,700,700italic' rel='stylesheet' type='text/css'>' ;?>
(Not tested yet - post with your results if you try it.)
17 Apr 2013, 4:39 AM
#3
petergy avatar

petergy

New Zenner

Join Date:
Sep 2012
Posts:
65
Plugin Contributions:
0

Re: What file do I edit if I would like to add a css link?

Pasted:

<link href='http://fonts.googleapis.com/css?family=Arvo:400,400italic,700,700italic' rel='stylesheet' type='text/css'>

into the <head> of /includes/templates/your_template/common/html_header.php

Added:
font-family: 'Arvo', serif;

into the body{} of my stylesheet.

Works great!
Thank you