Skip to main content

Setting font-family in different jmaki widgets

3 replies [Last post]
rayo
Offline
Joined: 2008-06-12
Points: 0

Hi.
I need help.
I need to set the same font-family and size attribute in the widgets dojo.tree, dojo.tabbedview and yahoo.dataTable.
The problem is simple, I am using those three widgets in the same page and I need to use the same font-family and size.
Does anyone have an idea??

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rayo
Offline
Joined: 2008-06-12
Points: 0

Hi Greg.

I'm sorry, Your solution is just great.

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Rayo,

One of the issues with the older dojo widgets is the font families need to be set after the widgets have loaded because they dynamically load the styles at runtime.

You can do this with jMaki by placing the following code at the *end* of your page (after all widgets).

You will need to create the styles.css file and place it in the top directory of your application:

Here is what I have:

div.dojoTree {
font-family : cursive;
color : red;
}

.yui-skin-sam .yui-dt table td, .yui-skin-sam .yui-dt table th {
font-family : cursive;
}

.dojoTab {
font-family : cursive;
}

This will over-ride the font-family property used by The Dojo Tree, Dojo TabbedView and Yahoo DataTable to be cursive.

I used firebug to find these properties and you can too if you need to override others. The CSS cascade will make sure these properties get applied.

Please let me know if you still have issues.

-Greg

rayo
Offline
Joined: 2008-06-12
Points: 0

Hi Greg,
Thanks for the answer.
I’ m trying to change the font family with your solution and it seems does not work, may be because I do not understand how to properly use it.
I tried including the font family information directly around the widget programming text and it seems to work, it is not very clean but..
The other style information is going to be difficult if not impossible to change this way.
In what part of the code is located the manipulation of the styles, Do you have an idea?