Hi,

Tables (<table>) in virtuemart product detail view below 768px are broken when Atoms template is used. (above 768 works fine)

Same table in article works fine under Atoms.

Same table in virtuemart product details view under Cassiopeia template works also fine.

Can you please suggest a solution?

Thx in advance!

    8 days later

    zencso Hi

    The table on product detailed page looks fine in mobile view at my end:

    You can share the URL of that page on your site and the super admin account so I will check directly for you.

    Regards

    This message is visible to Moderators only
    hidden content
      6 days later

      zencso Hi

      I added your code into the description of a product and tested with Cassiopeia, but it doesn't look good there:

      As you can see in the table code, it has a fixed width 700px.

        This message is visible to Moderators only
        hidden content
          5 days later

          zencso As I can see you add the fixed width for table which is not good for responsive layout.

          The idea is that you can update the mockup a bit to make the table scroll horizontally on responsive layouts. Try with this:

          <div style="overflow-x: auto; width: 100%;">
              <table style="width: 700px; margin-left: auto; margin-right: auto;" border="1" cellspacing="0" cellpadding="5">
                  <tbody>
                      <tr>
                          <td style="width: 300px;"><strong>Daily portion<br /></strong></td>
                          <td style="width: 200px; text-align: center;" colspan="2">1 cap</td>
                          <td style="width: 200px; text-align: center;" colspan="2">2 caps</td>
                      </tr>
                      <tr>
                          <td style="width: 300px;">C vitamin</td>
                          <td style="width: 100px; text-align: center;">100 mg</td>
                          <td style="width: 100px; text-align: center;">350 RDA%</td>
                          <td style="width: 100px; text-align: center;">200 mg</td>
                          <td style="width: 100px; text-align: center;">700 RDA%</td>
                      </tr>
                      <tr>
                          <td colspan="5">*RDA: recommended daily unit for Adults</td>
                      </tr>
                  </tbody>
              </table>
          </div>
            This message is visible to Moderators only
            hidden content

            Hi

            You can use the following custom CSS:

            div.productdetails-view .productdetails-tabs .product-description table {
                display: table;
            }
            
            div.productdetails-view .productdetails-tabs .product-description table td {
                border: 1px solid #eee;
                padding: 5px 10px;
            }
            
            div.productdetails-view .productdetails-tabs .product-description table tr {
                display: table-row;
            }

            It will display the table as you desire

            Regards,

              6 days later
              This message is visible to Moderators only
              hidden content
              Write a Reply...
              You need to Login to view replies.