Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Style Title not working for font-size and font-family
19th December, 00:39 (This post was last modified: 19th December 00:40 by ForgotMyOrange.)
Post: #1
Style Title not working for font-size and font-family
This all works how I expect it would, except for the font-family and font-size.
I've followed the documentation as far as I can and cannot understand why the font size and family do not take effect on the tooltip title.

JS Code
return $('a[href][title]').qtip({
      content: {
        text: false
      },
      position: {
        corner: {
          target: 'topRight',
          tooltip: 'bottomLeft'
        }
      },
      style: {
        border: {
          width: 4,
          radius: 3,
          color: '#666666'
        },
        title: {
          'font-family': 'Meiryo',
          'font-size': '42px'
        },
        padding: 3,
        textAlign: 'center',
        tip: true,
        name: 'light'
      }
    });
Find all posts by this user
Quote this message in a reply
19th December, 19:33
Post: #2
RE: Style Title not working for font-size and font-family
Does it work if you camcel-case the properties instead?

JS Code
title: {
          fontFamily: 'Meiryo',
          fontSize: '42px'
        },

Craig Thompson
Web Developer / Designer
Craigsworks
http://www.craigsworks.com
Visit this user's website Find all posts by this user
Quote this message in a reply
19th December, 21:50 (This post was last modified: 19th December 21:59 by ForgotMyOrange.)
Post: #3
RE: Style Title not working for font-size and font-family
Thanks. Actually, with experimentation, I've figured it out.

To change the tooltip font size, do not use the 'title' property at all.
The fonts should go directly underneath style.

I guess there is a concept of a 'title' which is a title within a tooltip, not the tooltip itself.
I think the documentation just lead me into that wall but I think I get it now (There is no documentation on how to set the font of the tooltip but there is to set this 'title' - a concept which is not explained at that point)

JS Code
style: {
          fontFamily: 'Meiryo',
          fontSize: '42px'
        },


I must admit, I spent quite a while getting properties wrong with qtip... "is the property I want in the base, is it inside 'style' or embeded 2-deep?"
Jut wanting to change the background meant leaping into the code (the documentation is no help here) trial and error (with various other background properties, in different hierarchies)

My personal lesson learned, is maybe just make most properties in a flat hierarchy - which doesn't seem as organised, but saves a lot of guesses & mistakes when trying to use it.

I also needed multiple fonts, which wouldn't work until I used double quotes around each individual font, which I show here to help anyone else (this isn't obvious)

JS Code
style: {
          'font-family': '"Meiryo", "Tahoma", "Verdana"'
          fontSize: '42px'
        },
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Recover title attribute content on hide baps 2 19 Yesterday 23:38
Last Post: baps
  qtip only working the first time harjits 2 24 Yesterday 23:31
Last Post: Craig
  [Solved] iframe size ignored? dabd 9 1,106 26th April 16:43
Last Post: joshrodgers
  [Solved] Tipp with title & content in title fspade 2 363 21st February 06:42
Last Post: fspade
  [Solved] IE 8 "Style > Tip" not displaying shameless hacker 30 8,991 9th February 18:49
Last Post: nickast
  Dynamic contenct not working property in sortable cleung 5 737 8th December 18:45
Last Post: Craig
  Youtube demo not working on ffox 6 & 7 ivanmayes 2 696 11th October 17:14
Last Post: ivanmayes
  [Solved] Why is this not working - Link nested in tooltip needed 1 547 12th September 17:10
Last Post: Craig
  [Solved] Blanket Destroy not working migdalskiy 2 512 22nd August 22:44
Last Post: migdalskiy
  Unfocus Not Working biglesliep 1 760 13th August 12:50
Last Post: Craig



User(s) browsing this thread: 1 Guest(s)