Create 3 columns with extra positions

Q:How do I place 3 columns in a row with your extra positions?

A: Its simple. If you are using Opencart 2, you can use bootstrap styles like this

just go to catalog/view/theme/YOUR THEME/template/common/home.tpl

and add this code

<div class="col-md-4">
<?php echo $column_extra1; ?>
</div>
<div class="col-md-4">
<?php echo $column_extra2; ?>
</div>
<div class="col-md-4">
<?php echo $column_extra3; ?>
</div>

before or after <?php echo $content_top; ?>

 

But if you do not have bootstrap in your theme, you will need to recreate the code for columns. 

<style>
.col{
width:30%;
margin: 5px 0px;
margin-right: 5%;
float: left;
}
.col:last-child{
margin-right: 0px;
}
</style>

<div class="col">
<?php echo $column_extra1; ?>
</div>
<div class="col">
<?php echo $column_extra2; ?>
</div>
<div class="col">
<?php echo $column_extra3; ?>
</div>

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk