This is really a javascript/css query but bear with me, it's related to galleria...

galleria.css has the following setting for the galleria-nav class

.galleria-nav {
  clear: both;
  display: none;
}

However the navigation area in FF3 is behaving as if its display attribute is set to BLOCK

Viewing source shows no display attribute set for the div, however inspecting with Firebug shows the following:

<div class="galleria-nav" style="display: block;">

The corresponding CSS in Firebug shows:

element.style {
display:block;
}

So this element styling must be coming from somewhere, maybe Javascript?
Can anyone advise how I can get the div's style to be re-set to display:none ?

Thanks

Comments

Mark Theunissen’s picture

The correct way would be to override the theme function and remove the nav from the variables array.

The hackish-but-valid method is to add an !important to the css style. Put this somewhere in your css:

.galleria-nav {
  display: none !important;
}
frost’s picture

Mark
I know this is more general and not really a galleria question per se, so I do appreciate your time, thank you!
I'm in the process of learning theming, so I'll go for the override theme route if you can provide a little assistance:

Looking at the galleria.module, I'm not sure which function you mean by the "theme function". Is it galleria_theme(), template_preprocess_galleria(&$vars) or another one? I see that the latter has a variables array passed in, but I don't see where it might be using "nav"

Thanks again
Mike

Mark Theunissen’s picture

Sure thing, let me give you a nudge in the correct direction. First, use the 6.x-1.x version of Galleria (the latest code), because it has a few additions and will soon be released as the next Beta.

There is a function in there called template_preprocess_galleria(&$vars) which creates the variables that get sent to the template file galleria.tpl.php.

So you actually have a choice. You can either copy the template file into your theme directory and remove the <div class="galleria-nav"> from the copy, which will override the original template and the links won't appear.

Or, if you want them to appear under certain conditions, e.g. for some nodes and not others, then you can't just remove the section from the template. You then need to write a preprocess function in your theme's template.php file. You would call it xxxxxxx_preprocess_galleria(&$vars) where xxxxx is the name of your theme. All this function has to do is call unset($vars['next_prev_links']);. That will unset the variable. You could wrap that in an if statement and do it conditionally if you wanted.

More info here: http://drupal.org/node/173880

Good luck!

Mark Theunissen’s picture

And more about preprocessing : http://drupal.org/node/223430

Mark Theunissen’s picture

Status: Active » Closed (fixed)