Post by ESS1 » Tue Feb 02, 2016 7:32 pm

Hi, I am using version 2.0.1.1 and the html content module to insert a table, however it is not responsive.

Can anyone help me create a 2 row 2 column table that I can insert images into?

Many thanks

Newbie

Posts

Joined
Tue Oct 06, 2015 10:04 pm

Post by ocart777 » Tue Feb 02, 2016 10:07 pm

you can try this one, but make sure to add this in code editor mode

Code: Select all

<div class="table-responsive">
  <table class="table table-bordered table-hover">
    <thead>
      <tr>
        <td class="text-left col-sm-6">COLUMN 1</td>
        <td class="text-left col-sm-6">COLUMN 2</td>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td class="text-left">ROW 1</td>
        <td class="text-left">ROW 2</td>
      </tr>
    </tbody>
  </table>
</div>
Last edited by ocart777 on Wed Feb 03, 2016 11:39 pm, edited 1 time in total.

You can't control the weather, but you can change your mood.
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.


OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE


User avatar
Active Member

Posts

Joined
Mon Jun 10, 2013 4:57 pm
Location - Malaysia

Post by ESS1 » Wed Feb 03, 2016 3:35 am

No it adds it to the bottom of the page and is not responsive :(

Attachments

ss.png

ss.png (96.86 KiB) Viewed 2847 times


Newbie

Posts

Joined
Tue Oct 06, 2015 10:04 pm

Post by ocart777 » Wed Feb 03, 2016 11:29 am

its seem to be working fine with me on default template and on any position with responsive, just make sure you did change the sort order of the layout on home(design/layout/home) and one more thing is the content bottom of your template seem like it is placed after the footer, just in case please confirm that your home.tpl code looks more likely like this.

Code: Select all

<?php echo $header; ?>
<div class="container">
  <div class="row"><?php echo $column_left; ?>
    <?php if ($column_left && $column_right) { ?>
    <?php $class = 'col-sm-6'; ?>
    <?php } elseif ($column_left || $column_right) { ?>
    <?php $class = 'col-sm-9'; ?>
    <?php } else { ?>
    <?php $class = 'col-sm-12'; ?>
    <?php } ?>
    <div id="content" class="<?php echo $class; ?>"><?php echo $content_top; ?><?php echo $content_bottom; ?></div>
    <?php echo $column_right; ?></div>
</div>
<?php echo $footer; ?>
and one more thing is, please try to put an .img-responsive class on your image

Edit*
here some example of mine
htmlmodule1.jpg

htmlmodule1.jpg (124.68 KiB) Viewed 2835 times

htmlmodule2.jpg

htmlmodule2.jpg (119.93 KiB) Viewed 2835 times


You can't control the weather, but you can change your mood.
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.


OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE


User avatar
Active Member

Posts

Joined
Mon Jun 10, 2013 4:57 pm
Location - Malaysia

Post by ESS1 » Wed Feb 03, 2016 7:22 pm

Thanks.

I have it working with your code now and is reponsive!

BUT as I add images instead of your text it breaks .... See screen shot.

Thanks so much for your help so far :)

Attachments

IMG_5575.PNG

IMG_5575.PNG (332.31 KiB) Viewed 2825 times


Newbie

Posts

Joined
Tue Oct 06, 2015 10:04 pm

Post by ocart777 » Wed Feb 03, 2016 11:48 pm

ESS1 wrote:BUT as I add images instead of your text it breaks .... See screen shot.
i don't really get what you mean, what are you trying to archive actually? may see the html code you've done so far?

You can't control the weather, but you can change your mood.
You can't modify the visage, but you can show your smile.
You can't command someone else, but you can hold yourself.
You can't forecast tomorrow, but you can using today.
You can't obtain thanks, but you can exert yourself in everything.


OCEXTENSION.COM - YOUR PROFESSIONAL OPENCART EXTENSION STORE


User avatar
Active Member

Posts

Joined
Mon Jun 10, 2013 4:57 pm
Location - Malaysia
Who is online

Users browsing this forum: No registered users and 39 guests