Email
Share

We Rock Your Web Forum » Markup Languages » CSS

Cufon Line-Height Not Working

(8 posts)
  1. DrupalJunkie

    senior member
    Joined: Oct '09
    Posts: 77

    I'm using the Cufon module on my Drupal 6.x site to embed a font (it works great - you can see the text in the source for search-engine friendliness, yet the users see the nice new font on the page). One of the drawbacks, of course, is the text is not selectable. Other than that, everything has been working great until now - for some reason it's not recognizing my line-height CSS command!

    I know the problem lies with Cufon because when I remove the selector used to activate the font (so the text falls back to a normal web font), the line-height kicks in.

    Any ideas how to get line-height working with Cufon?

    Posted 1 year ago #

  2. Posted 1 year ago
  3. cwd

    senior admin
    Joined: Jul '09
    Posts: 225

    Try setting your document header to use the XHTML Strict DocType (as opposed to Transitional). For example:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    For some reason the Cufon font line-height attribute only works using the XHTML Strict DocType.

    Posted 1 year ago #
  4. DrupalJunkie

    senior member
    Joined: Oct '09
    Posts: 77

    That's it! I can't believe it - how strange is that? Working great now and my lines aren't all jumbled together Thanks CWD!

    Posted 1 year ago #
  5. Anonymous



    Posts: 1

    I am having the same problem with my Joomla site I am developing. Can this solution be applied in Joomla and if so how?

    Posted 1 year ago #
  6. Anonymous



    Should work the same in Joomla. Simply open your template file and replace the header with the snippet CWD mentions above.

    Posted 1 year ago #
  7. Anonymous



    thanks cwd senior admin I was having the same issue in wordpress

    Posted 10 months ago #
  8. Anonymous



    OMG THANKS

    Posted 9 months ago #
  9. Anonymous



    Thank you so much! I was struggling with this for almost an hour!

    Posted 2 months ago #

RSS feed for this topic

Reply

(required)

Allowed markup: BBcode blockquote code em strong ul ol li font strike center u hr.
You can also put code in between backtick ( ` ) characters.