arusso-accessgroup
-
11/1/2010 10:18:11 AM
Using the Google Font API and Kentico CSS stylesheets?
I began using the Google Font API to load in fonts that are not normally available in most web browsers. Using the Google Font API is very simple, you add a link reference to the google api and specify the font you want. For example:
<link href='http://fonts.googleapis.com/css?family=Nobile:regular,bold&subset=latin' rel='stylesheet' type='text/css' />
Then you speciy the font by name in the styles of your CSS stylesheet:
h1, h2, h3, h4 { font-family: "Nobile", "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", Tahoma, sans-serif; font-weight: normal; }
The problem I'm having is that we prefer to use Kentico's stylesheets instead of referencing outside CSS stylesheets for our sites. The stylesheet reference is hard-coded in the Kentico page layout and comes before any extra code you wish to add to the HEAD section. For example:
<html> <head> <title> Client Portal - </title> <meta http-equiv="pragma" content="no-cache" /> <link type="text/css" rel="stylesheet" href="/KenticoWeb/ClientPortal/CMSPages/GetCSS.aspx?stylesheetname=ClientPortal" />
... followed by textarea of the HEAD section.
I've tried referencing the google link as a URL reference in the stylesheet, but it will not work that way. Has anyone been able to get this work using Kentico stylesheets?
|