I wanted to overlay a logo image on rotating banners in beautiful Marinelli theme, but this feature is not implemented.

So I modified style.css and page.tpl.php - I'm using Drupal 5.x, so changes are applied to Marinelli Theme 5.x-1.2 (2008-Jun-18).

Changes are quite simple, and can be done by hand, but I supply diff files for patching, too.
I left title on the left and positioned the logo imagine on the right; Some tweaking may be necessary on logo margins in css, and logo image height must not be greater than height of banner (i.e. 180 px's).

Here are details for modifying manually:

Open style.css in your editor

under existing lines:

#header {
padding: 0;
margin: 0;
height: 180px;
background: #000033 url(img/banners/rotate.php) no-repeat 0px 0px;
position:relative;
}

add these new lines:

#logo{
/*  be careful: max height of logo image : 180px (as header's height) */

/* assuming some defaults: modify margins as required */
margin-top: 30px; /* "n px" where n=(180-logo_height)/2  to have image vertically centered  */
margin-right: 35px;
margin-bottom: 0px;
margin-left: 0px;
/* logo image on the right */
float: right;
padding:0;
}

#logo img{
padding:0;
margin:0;
}

save and close.

Open page.tpl.php in your editor
under existing lines:

<div id="page">

  <div id="header">

add these new lines:

  <?php if ($logo): ?>
<!-- logo_image -->
<div id="logo">
            <a href="<?php print $base_path; ?>" title="<?php print t('Home'); ?>"> <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" id="logo" /> </a>
</div>
<!-- /logo_image  -->
  <?php endif; ?>

save and close.
You are done. :-)

I didn't try, but I suppose a similar approach can be done for drupal 6.x version

mau

Comments

mau-it’s picture

Status:Active» Needs review
joetoday’s picture

AWESOME fix, works on 6.x too!

nikmahajan’s picture

Yeah works on 6X but to make image overflow hidden, following should be put into #logo {}

overflow: hidden;

odox’s picture

Version:5.x-1.2» 6.x-2.95

Could not get this logo feature to work, with or without code on latest version. Can anyone help?

guitarma’s picture

I moved the Primary links to below the header, but above the secondary links. My question is: how do I add a region ABOVE the header? I want to put ad space there. Same width as the banner, but only 90-100 pixels high.
I don't have enough php experience to add the region myself, or to even know all of the files to add it to.

Can anyone help me?? Thank you so much, if so!

OOps! Just realized I posted in the wrong place - sorry, I'll move it!

jfmoore’s picture

Thanks for the fix. I'm not sure, though, what the logo should be named and where it should reside?

Michal1986’s picture

whether it works for version 5?
Where can I download themes for version 5 ??

sino’s picture

Thanks mau! It works for Drupal 6.13.

jfmoore, no need to concern about the logo image file name, just upload it via

Home » Administer » Site building » Themes

bchezem’s picture

When using the Giordani sub-theme in 6.13, make these changes....Instead of using style.css ( which has been replaced by several other CSS ) use sites/all/themes/marinelli/graphics.css

Instead of the marinelli/page.tpl.php, use sites/all/themes/marinelli/giordani/page.tpl.php.

Also, the banner images in Giordani are 200px high...this is of little consequence except for centering logos.

garpy’s picture

This worked nicely. At the moment I am not getting the logo to display on the home page. Which I would like. If I find out why I will post it here. Probably something easy. If you know please kindly post here. Cheers

garpy’s picture

Ok so putting the same code in the page-front.tpl.php worked for getting the logo to land on the front page as well. A few nip and tucks with firebug to the css were needed as well to get the position right. I was able to put a larger than mentioned logo too which was nice.

mrbrowny’s picture

just suscribing :)

drupal92037’s picture

Worked for me on Drupal 6.14. Thanks!

Bob Stein’s picture

Outstanding. Works in Drupal 6.14. Thanks very much.

laxking’s picture

worked great!

heinzeroth’s picture

Title:logo image support for marinelli theme for drupal 5.x» logo image support for marinelli theme for drupal 6.x

Drupal 6.16 - Marinelli: Giordani Theme

I uploaded logo in size of 175x200px, but when viewing in header, image loads in size of 53x60px !!!

So I added a resize in:

marinelli/graphics.css

#logo img{
padding:0;
margin:0;
width: 90px;
height: 115px;
}

But image is distorted somewhat - possibly may have to resize image to this pixel size.

And my image is centered and will overlap into secondary link bar:

Is there anyway of taking the vertical center out so that image can be positioned using margins or padding???

example: www.greatlifeinsurancegroup.com/newsblog

AuctionTeamster’s picture

Works in 6.17 ----- THANKS

Note:

If you have created a custom maintenance_page.tpl.php copy the code to the template works. Thanks again.

pswasey’s picture

Version:6.x-2.95» 7.x-3.0-beta9

I would really like to utilize a logo overlay on my banner, but this process isn't working in 7.x. Does anyone have any recommendations? Has anyone been able to do something similar in 7.x?

Thanks!

WoRo’s picture

solution does not work in IE 7. Logo moves banner to the right/left (depends where you place logo). FF/Chrome/Safari/IE9 OK. But not in IE 7.