Question

On my Joomla 2.5 site, I set up a menu with Maximenu CK. I have the plugin Maximenu params, too, for easy styling. I am using the blank theme for a horizontal menu.

Problem: I wasn't able to apply a custom Google font though. More specifically: which css to change?

I tried to track down the location with Firebug, but found that the font-definition was inline in my main html. I guess this is done with php and include, but don't know where to look further.

Was it helpful?

Solution

I have never worked with Google custom fonts but this is how I was able to change Maximenu CK's font family to a usual font like Palatino, Arial or Tahoma:

From Joomla root directory I navigated to modules/mod_maximenuck/themes/blank/css which I assume is the directory containing blank theme's styling files.
Within the css directory, I found the following files: ie7.css, index.html,maximenuhck.php, maximenuhck_rtl.php, maximenuvck.php, moo_maximenuhck.css, moo_maximenuhck_rtl.css and moo_maximenuvck.css.

I was able to change menu font by updating maximenuhck.php

Here is the portion of code to which I added my preferred font family (starts at line 12):

/* menu */
div#<?php echo $id; ?> {
    font-size:14px;
    line-height:21px;
    text-align:left;
}

I hope this is helpful.

OTHER TIPS

One way to do it would be to treat this the same as for any other text on the page which you wish to style.

In the head of your template bring in the font file, e.g.

<link href="http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300" rel="stylesheet" type="text/css">  

Using firebug check the class of menu and target anchor tags inside that menu with CSS which you add to your site CSS file, e.g.

.maximenuCKH a{ 
font-family: 'Open Sans Condensed', sans-serif;  
}  

You might have to tweak the selector to suit your needs, but this will hopefully get you started.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top