center logo in protostar template

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
derekwiking
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Mar 01, 2012 3:06 pm

center logo in protostar template

Post by derekwiking » Wed Jun 05, 2013 3:25 pm

I tried almost everything, but cant handle this...
Tried to modify template.css, index.php...
here is the url:
http://www.dieraber.altervista.org/

 
Pablo_WE
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu May 30, 2013 2:24 pm
Contact:

Re: center logo in protostar template

Post by Pablo_WE » Thu Jun 06, 2013 4:42 pm

Hi,

Try to put this code at the bottom of the template.css file:

Code: Select all

div.header a.brand {
	float: none;
}

div.header a.brand img {
	display: block;
	margin: 0 auto;
}
Pablo
http://www.webempresa.com - Expertos Joomla!

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

Re: center logo in protostar template

Post by phoenixlaef » Sat Aug 03, 2013 4:20 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>

berlin80210
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Apr 14, 2011 7:14 pm

Re: center logo in protostar template

Post by berlin80210 » Sun Oct 25, 2015 5:12 pm

This ultimately worked for me:

.brand {
-webkit-transition: color .5s linear;
-moz-transition: color .5s linear;
-o-transition: color .5s linear;
transition: color .5s linear;
float: none;
display: block;
text-align: center;
margin-left: 20px;
margin-top: 0px;
width: 100%;
}

 

Locked

Return to “Templates for Joomla! 3.x”