I am using the zen subtheme "cti flex". It seems that when I use a logo, it pushes the header region below it. I need a search bar + other links parralel to the logo on the right side of the screen.

So I guess I need a way to split the header into 2 seperate regions like header_left and header_right. The problem is I'm very new to Drupal and have no idea how to do that. Can somebody here help me with it?

Comments

onejam’s picture

This is easily done by adding this in page.tpl.php:

<!-- Header left -->
<?php if ($header_left): ?>
        <div id="header-left">
          <?php print $header_left; ?>
        </div> <!-- /end #header-left -->
      <?php endif; ?>
<?php if ($header_right): ?>
        <div id="header-right">
          <?php print $header_right; ?>
        </div> <!-- /end #header-right -->
      <?php endif; ?>

Then in your .info file add:

regions[header_left]           = Header left
regions[header_right]          = Header right

Remember to go to the performance page settings and clear your cache.

-----------------------------------------------------------------
We build engaging websites and intuitive designs that will benefit your business.
Duvien

miketor’s picture

I tried what you suggested, but instead of creating a left and right side, it simply made 2 new blocks, 1 on top of the other. Am I putting it in the wrong part of the file or doing something else incorrectly?

onejam’s picture

Put the first code snippet in the page.tpl.php file. You'll need to work out where you want the regions to appear on your template. Then style both of them to float side by side each other.

-----------------------------------------------------------------
We build engaging websites and intuitive designs that will benefit your business.
Duvien

miketor’s picture

I want my site logo/name on the left and the other content on the right.

Sorry, I don't mean to bug you, but I'm not sure what you mean. How do I style both of them to float side by side?

Any more help would be really appreciated.

miketor’s picture

Ok so apparently I need to know css to style them. I don't know any css. Can anyone here help me out? I simply need a blank region with no special styling that is situated on the right side of the header opposite the logo.

miketor’s picture

Anybody?

dopedwizard’s picture

You have to go into your css file than add the region there that you added to the tpl file. After that you have to assign the region (div) where it is supposed to be.

here a link I just found via google. Just search for placing divs or something like that there are quiet some extensive once out there.

http://allwebco-templates.com/support/S_add_div.htm

davidgtuttle@gmail.com’s picture

Float is a complex and difficult to master concept. I still have problems at times. Check out these resources -

http://css.maxdesign.com.au/floatutorial/
http://www.tizag.com/cssT/float.php
http://www.w3schools.com/CSS/css_float.asp

Also, make sure you understand how to use "clear" if things aren't lining up in the divs below the ones you are trying to float.