Jump to content


Photo
- - - - -

Still Having CSS Issue with H Tags & Font Definitions


  • Please log in to reply
27 replies to this topic

#21 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 11 May 2012 - 01:58 PM

I looked at your pastebin and noticed that you have this code inside a function in there:

Please Login or Register to see this Hidden Content


I usually add this code to the Header Scripts area in the Custom Code settings and the font works just fine. When I want to implement more than one font from Google Web Fonts, the code would be this, for example (different fonts separated by a single "|" mark):

Please Login or Register to see this Hidden Content



#22 WebWerx

WebWerx

    Advocate

  • Members
  • 546 posts
  • LocationCanada
  • Framework Version:2.2
  • Country: Country Flag

Posted 11 May 2012 - 02:11 PM

@catrina: Thanks. I like what you are saying... I never thought of putting it there:

Please Login or Register to see this Hidden Content

@hperkins: The young lady is right:

Please Login or Register to see this Hidden Content

I simple added reference to Alfa Slab One in the Google font API like so:

Please Login or Register to see this Hidden Content

@hperkins: I will remove the script from functions.php cc: @Danny & @rangealone (because these guys were involved also). PS Kicking myself for totally forgetting about the ability to add stuff to the Header Script in PL! PSS Thank you one and all!

#23 WebWerx

WebWerx

    Advocate

  • Members
  • 546 posts
  • LocationCanada
  • Framework Version:2.2
  • Country: Country Flag

Posted 11 May 2012 - 02:24 PM

@catrina: One follow-up question. What if I want to add a font family that is not part of the Google font library? IE "Georgia" PS You rock! You do not know how long I have been looking for this answer... (You do if you read all of my posts on the topic)

#24 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 11 May 2012 - 02:44 PM

Is Georgia the font you want to use? Since Georgia is one of the many websafe fonts, you don't need to add it using any special technique. You can simply add it like this in CSS:

Please Login or Register to see this Hidden Content



#25 WebWerx

WebWerx

    Advocate

  • Members
  • 546 posts
  • LocationCanada
  • Framework Version:2.2
  • Country: Country Flag

Posted 11 May 2012 - 03:05 PM

Danke @catrina: I figured this out after the fact. Fonts are maddening....... until you understand the power of implementing them correctly. Yes, Georgia is one of them TGIF!

#26 Henry Perkins

Henry Perkins

    Friendly Contributor

  • Members
  • 197 posts
  • LocationAustin, TX
  • Framework Version:2.4.4
  • Country: Country Flag

Posted 11 May 2012 - 05:25 PM

My code will work unless you have something contradicting it somewhere. It is also saves you from having to redo things once you upgrade, and worrying about managing your settings in the admin at all.

Please Login or Register to see this Hidden Content



#27 WebWerx

WebWerx

    Advocate

  • Members
  • 546 posts
  • LocationCanada
  • Framework Version:2.2
  • Country: Country Flag

Posted 11 May 2012 - 05:32 PM

Hey @hperkins (Henry). I am sure it would work. But it didn't when I implemented it. Could have been an error on my part. Not sure why I would have to redo anything when upgrading as like everything else in the Pagelines Settings, it gets held and implemented at upgrade time... Like system fonts, colors etc.... @catrina: What are your thoughts here? Without trying to cause any internal strife, I think both solutions would work. But Catrina's is easier for the neophyte. Can we agree on that? Thanks again guys (gals).....

#28 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 11 May 2012 - 06:15 PM

I was kind of confused about what code/plugin/approach you were using. I've never personally used any Google font plugin before. I've only used the code provided by Google Web Fonts when you add fonts to a collection and choose to use them. Since I've never encountered any problems with that approach, I always use it and figured that maybe it'd work for you, too.