Question

I am working with Drupal 7 in a Zen 7.x-5.4 subtheme. I am attempting to add a primary navigation bar inside the header/banner area, to the right of the logo along the bottom.

I am not using the 'navigation' region provided as that sits below the header. Instead, I have added a menu block and placed it in the 'header' reagion. Unfortunately, it appears well below the header and logo.

Here is the pertinent html that is output:

<header id="header" class="header" role="banner">
    <a id="logo" class="header__logo" rel="home" title="Home" href="/sandbox/">
    <nav id="secondary-menu" class="header__secondary-menu" role="navigation">{this menu works fine}
    <div class="header__region region region-header">
        <div id="block-menu-menu-primary-nav" class="block block-menu first last odd"      role="navigation">
            <h2 class="block__title block-title">Primary Nav</h2>
            <ul class="menu">{menu list here}</ul>
        </div>
    </div>
</header>

The menu that isn't where I want it lies in the region-header class. Any time I add a block to 'header' in the zen interface, it ends up in that class and appears below the header, not in it. The secondary menu, which is in the header by default, is fine and exactly where it should be. There is no css currently defined for region-header. header is 120px in height and has plenty of room for what I want to do. page.tpl.php offers little more than "print render($page['header']);" so I don't appear to have any control there.

I have 2 questions:

How can I get this menu up into the header where I want it?

How can I get it to hide the 'Primary Nav' title on the menu block? The title is required when creating a menu block and there does not appear to be a method for making it invisible.

Please let me know if there is any more specific information needed to answer these questions.

And, yes, I know similar questions have been asked, but they seem to apply to other versions of Zen and none I've found have been at all helpful.

Was it helpful?

Solution

It never fails. 3 days I've been trying to figure this out before posting a question and as soon as I post, I figure it out.

There was a css block in misc.css with the following

/* Wrapper for any blocks placed in the header region. */
.header__region {
  /* Clear the logo. */
  clear: both;
}

I just had to comment out the 'clear: both;' line as that was not allowing anything else to float next to the logo.

I was able to remove the menu title by going to 'configure block' and adding "" in the title there to override the title required when creating the menu.

Hopefully this will be of use to someone.

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