Center Logo?

etdouglas - February 21, 2009 - 22:48
Project:Deco
Version:6.x-1.1
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

How would I go about centering the logo in this theme?

#1

Oyjord - March 3, 2009 - 17:24

Good question, I'd like to know as well.

#2

threaders - July 11, 2009 - 21:24

I moved the logo to the right. Moving to the center should work as follows:

Add to style.css:

.logo img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

Edit page.tpl.php:
Find

<div class="region-content">
<?php
if ($logo || $site_title) {

Replace with
<div class="region-content logo">
<?php
if ($logo || $site_title) {

Edit layout.css:
Find

#header h1 {
  height: 117px;
  margin: 0;
  position: absolute;
}

Replace with
#header h1 {
  height: 117px;
  margin: 0;
  position: static;
}

#3

TauTau - July 15, 2009 - 11:18

could you perhaps also post how you moved it to the right?
Edit: When moving the logo to the center as described, the primary links won't work anymore, they are positioned too low and not linked

#4

threaders - July 16, 2009 - 18:54

For moving to the right, I did the same as #2 except:

In style.css:

.logo img {
  float: right;
}

Sorry about breaking the primary links. I don't use them on my site.

 
 

Drupal is a registered trademark of Dries Buytaert.