Advertisement

centering the logo in the header

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
miab
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Feb 27, 2013 7:08 pm

centering the logo in the header

Post by miab » Wed Feb 27, 2013 7:11 pm

Hi, I have tried unsuccessfully to center my logo image. I have found a way to make it right align, but not to center. Can anyone point my in the right direction?

Thanks in advance!
Mia

Advertisement
byman64
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Fri Feb 25, 2011 1:13 am

Re: centering the logo in the header

Post by byman64 » Sat Mar 02, 2013 4:52 pm

Hi, I had the same problem for a m8 website (http://www.pignarea.com)

Here what I have done, I don't know if there are more elegant solutions...

Open the templace css file (templates/protostar/css/template.css) and at the end add the following css class

Code: Select all

.brand img {
margin: 0 auto 0 auto;
display: block;
}
Try it and let me know if it works...
note I dont remember if I changed other stuff...pls post the url address of your website.

http://www.byman.it/site/index.php?opti ... Itemid=101

User avatar
phoenixlaef
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Mar 14, 2011 6:02 am
Location: Perth, Australia
Contact:

Re: centering the logo in the header

Post by phoenixlaef » Sat Aug 03, 2013 4:19 pm

Went to "/templates/protostar/css/template.css" as mentioned and changed:

Code: Select all

.header {
	margin-bottom: 10px;
}
to

Code: Select all

.header {
	margin-bottom: 10px;
   text-align: center;
}
Then I went to "/templates/protostar/index.php" and changed:

Code: Select all

 <div class="header-inner clearfix">
                                        <a  class="brand pull-left" href="<?php echo $this->baseurl; ?>">
                                                <?php echo $logo;?> <?php if ($this->params->get('sitedescription')) { echo '<div class="site-description">'. htmlspecialchars($this->params->get('sitedescription')) .'</div>'; } ?>
                                        </a>
to

Code: Select all

 <div class="header-inner clearfix">
                                        <a  class="brand" href="<?php echo $this->baseurl; ?>">
                                                <?php echo $logo;?> <?php if ($this->params->get('sitedescription')) { echo '<div class="site-description">'. htmlspecialchars($this->params->get('sitedescription')) .'</div>'; } ?>
                                        </a>

Advertisement

Locked

Return to “Templates for Joomla! 3.x”