I'm using the default template and have removed cart from the header to try center the logo.
I tried editing CSS and it doesn't work.
Has anyone tried centering the logo on the default template on ver2.2?
BeeBee
When the going gets weird, the weird turn Pro!!
to enable me to make the things work!
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Hey Ernie,IP_CAM wrote:never heard of you anymore, after I informed you, to add some more tools, and add to CodeManager Admin Rights,
to enable me to make the things work!
Ernie
I'll PM the reason.
~B
BeeBee
When the going gets weird, the weird turn Pro!!
Code: Select all
#logo {
text-align: center;
}
#logo img {
display: inline-block;
}
http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension
Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme
Extra Positions PRO, Custom JavaScript, Custom CSS and others
Thanks Viethemes! But it didn't workviethemes wrote:To do that you can install my free extension Custom CSS and add below codeCode: Select all
#logo { text-align: center; } #logo img { display: inline-block; }
BeeBee
When the going gets weird, the weird turn Pro!!
Hi Therebeebee wrote:Hello,
I'm using the default template and have removed cart from the header to try center the logo.
I tried editing CSS and it doesn't work.
Has anyone tried centering the logo on the default template on ver2.2?
in /catalog/view/theme/default/template/common/header.tpl here the code :
Code: Select all
<header>
<div class="container">
<div class="row">
<div class="col-sm-4">
<div id="logo">
<?php if ($logo) { ?>
<a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" class="img-responsive" /></a>
<?php } else { ?>
<h1><a href="<?php echo $home; ?>"><?php echo $name; ?></a></h1>
<?php } ?>
</div>
</div>
<div class="col-sm-5"><?php echo $search; ?>
</div>
<div class="col-sm-3"><?php echo $cart; ?></div>
</div>
</div>
</header>
here the complete code :
Code: Select all
<header>
<div class="container">
<div class="row">
<div class="col-sm-4"><?php echo $search; ?></div>
<div class="col-sm-4">
<div id="logo">
<?php if ($logo) { ?>
<a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" class="img-responsive" /></a>
<?php } else { ?>
<h1><a href="<?php echo $home; ?>"><?php echo $name; ?></a></h1>
<?php } ?>
</div>
</div>
<div class="col-sm-4"><?php echo $cart; ?></div>
</div>
</div>
</header>
Thanks a lot rHat, it workedrHat wrote:i changed all col-sm in <header> to col-sm-4 and i cut search div and paste it at the top of logo div .Code: Select all
<header> <div class="container"> <div class="row"> <div class="col-sm-4"><?php echo $search; ?></div> <div class="col-sm-4"> <div id="logo"> <?php if ($logo) { ?> <a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" class="img-responsive" /></a> <?php } else { ?> <h1><a href="<?php echo $home; ?>"><?php echo $name; ?></a></h1> <?php } ?> </div> </div> <div class="col-sm-4"><?php echo $cart; ?></div> </div> </div> </header>
The logo is now centered!! Yippee!!
BeeBee
When the going gets weird, the weird turn Pro!!
Users browsing this forum: No registered users and 56 guests