1

我需要这方面的帮助,因为坦率地说,我一直试图修复它一段时间。Magento transporter 将桌子包裹在 a<div>中,<div>元素打破了我的桌子,我找不到任何原因。这是代码。任何人都可以帮忙吗?

<table role="presentation" cellpadding="0" cellspacing="0" width="" style="height: 205px; table-layout: fixed; border: solid 1px #efefef; background-color: #fdfdfd; padding: 15px 12px 19px; margin-bottom:10px !important;" >
  <tbody>
  <tr>
        <td colspan="80%">
            <table role="presentation" cellpadding="0" cellspacing="0" style="text-align: center; table-layout: fixed; width: 100%; height: 180px;">
            <tbody>
                <tr style="width: 100%;">
                    <td colspan=65% style="">
                        <div>  חולצת בייסיק ניקי</div>
                    </td>
                    <td colspan="5%" style="">
                        <div style="height: 20px; width: 2px;  background-color: black; margin: auto;">
                        </div>
                    </td>
                    <td colspan=30% style="">
                        <div > FOX </div>
                    </td>
                </tr>
                <tr>
                    <td colspan=33% style="">
                    </td>
                    <td colspan=33% style="">
                    <? echo ?> L מידה
                    </td>
                    <td colspan="2%" style="">
                        <div style="height: 20px; width: 2px;  background-color: #e6e6e6; margin: auto;">
                        </div>
                    </td>
                    <td colspan=32% style="">
                    <div class="swatch-option color" option-type="1" option-id="&lt;?=$k['optionId'] ?&gt;" option-label="&lt;?=$k['optionLabel'] ?&gt;"></div>
                          צבע
                      </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="65%" style="">
                    <div style="text-align:right">
M
                        </div>
                    </td>
                    <td colspan="35%"style="">
                    <div>
                    :החלפה ל
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="65%" style="">
                    <div style="text-align:right">
                       motiv pentru ca
                        </div>
                    </td>
                    <td colspan="35%"style="">
                    <div>
                    :סיבת החלפה
                        </div>
                    </td>
                </tr>
  </tbody>
            </table>
        </td>
        <td colspan="20%" >
            <div style="display:block;width:104px; height:145px;text-align: center; font-size: 0; background:url('https://preview.redd.it/dafv3ne6kua21.jpg?width=640&crop=smart&auto=webp&s=7939967e8a33a8e9a18d999467e4f73a9ebb2e20') no-repeat center; background-size: cover; position: relative">
            </div>
            <div style="
            position:absolute;
            z-index: 1;
            width: 104px;
            height: 24px;
            opacity: 0.8;
            background-color: #000;
            color: white;
            text-align: center;
            line-height: 24px;">
           פריט החלפה
            </div>
        </td>
        
    </tr>
  </tbody>
  </table>
  </div>
    <table role="presentation" cellpadding="0" cellspacing="0" width="550" style="height: 205px; table-layout: fixed; border: solid 1px #efefef; background-color: #fdfdfd; padding: 15px 12px 19px;margin-bottom:10px !important" >
        <tbody>
        <tr>
        <td colspan="80%">
            <table role="presentation" cellpadding="0" cellspacing="0" style="text-align: center; table-layout: fixed; width: 100%; height: 180px;">
            <tbody>   
            <tr style="width: 100%;">
                    <td colspan=65% style="">
                        <div>  <? echo $k['name'] ?></div>
                    </td>
                    <td colspan="5%" style="">
                        <div style="height: 20px; width: 2px;  background-color: black; margin: auto;">
                        </div>
                    </td>
                    <td colspan=30% style="">
                        <div > <? echo $k['brand'] ?> </div>
                    </td>
                </tr>
                <tr>
                    <td colspan=33% style="">
                    <div>
                        מחיר      ₪&lt;? echo (float)$k['price'] ?> 
                        </div>
                    </td>
                    <td colspan="2%" style="">
                        <div style="height: 20px; width: 2px;  background-color: #e6e6e6; margin: auto;">
                        </div>
                    </td>
                    <td colspan=33% style="">
                    <? echo $k['sizeReceived'] ?> מידה
                    </td>
                    <td colspan="2%" style="">
                        <div style="height: 20px; width: 2px;  background-color: #e6e6e6; margin: auto;">
                        </div>
                    </td>
                    <td colspan=32% style="">
                    <div class="swatch-option color" option-type="1" option-id="&lt;?=$k['optionId'] ?&gt;" option-label="&lt;?=$k['optionLabel'] ?&gt;"></div>
                          צבע
                      </div>
                    </td>
                </tr>
              
                <tr>
                    <td colspan="65%" style="">
                    <div style="text-align:right">
                        <? echo $k['reason'] ?>
                        </div>
                    </td>
                    <td colspan="35%"style="">
                    <div>
                    :סיבת החזרה
                        </div>
                    </td>
                </tr>
  </tbody>
            </table>
        </td>
        <td colspan="20%" >
            <div style="display:block;width:104px; height:145px;text-align: center; font-size: 0; background:url('<? echo $k['image'] ?>') no-repeat center; background-size: cover; position: relative">
            </div>
            <div style="
            position:absolute;
            z-index: 2;
            width: 104px;
            height: 24px;
            opacity: 0.8;
            background-color: #000;
            color: white;
            text-align: center;
            line-height: 24px;">
            פריט החזרה
            </div>
        </td>
        
    </tr>
  </tbody>
  </table>
4

1 回答 1

1

代码格式存在很多问题,可能导致表格中断。当你修复这些时,它应该看起来像这样:

<table role="presentation" cellpadding="0" cellspacing="0" width=""
       style="height: 205px; table-layout: fixed; border: solid 1px #efefef; background-color: #fdfdfd; padding: 15px 12px 19px; margin-bottom:10px !important;">
    <tbody>
    <tr>
        <td colspan="80%">
            <table role="presentation" cellpadding="0" cellspacing="0"
                   style="text-align: center; table-layout: fixed; width: 100%; height: 180px;">
                <tbody>
                <tr style="width: 100%;">
                    <td colspan="65%" style="">
                        <div> חולצת בייסיק ניקי</div>
                    </td>
                    <td colspan="5%" style="">
                        <div style="height: 20px; width: 2px;  background-color: black; margin: auto;">
                        </div>
                    </td>
                    <td colspan="30%" style="">
                        <div> FOX</div>
                    </td>
                </tr>
                <tr>
                    <td colspan="33%" style="">
                    </td>
                    <td colspan="33%" style="">
                        L מידה
                    </td>
                    <td colspan="2%" style="">
                        <div style="height: 20px; width: 2px;  background-color: #e6e6e6; margin: auto;">
                        </div>
                    </td>
                    <td colspan="32%" style="">
                        <div class="swatch-option color" option-type="1" option-id="<?php echo $k['optionId'] ?>"
                             option-label="<?php echo $k['optionLabel'] ?>">
                            צבע
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="65%" style="">
                        <div style="text-align:right">
                            M
                        </div>
                    </td>
                    <td colspan="35%" style="">
                        <div>
                            :החלפה ל
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="65%" style="">
                        <div style="text-align:right">
                            motiv pentru ca
                        </div>
                    </td>
                    <td colspan="35%" style="">
                        <div>
                            :סיבת החלפה
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>
        </td>
        <td colspan="20%">
            <div style="display:block;width:104px; height:145px;text-align: center; font-size: 0; background:url('https://preview.redd.it/dafv3ne6kua21.jpg?width=640&crop=smart&auto=webp&s=7939967e8a33a8e9a18d999467e4f73a9ebb2e20') no-repeat center; background-size: cover; position: relative">
            </div>
            <div style="
                position:absolute;
                z-index: 1;
                width: 104px;
                height: 24px;
                opacity: 0.8;
                background-color: #000;
                color: white;
                text-align: center;
                line-height: 24px;">
                פריט החלפה
            </div>
        </td>
    </tr>
    </tbody>
</table>
<table role="presentation" cellpadding="0" cellspacing="0" width="550"
       style="height: 205px; table-layout: fixed; border: solid 1px #efefef; background-color: #fdfdfd; padding: 15px 12px 19px;margin-bottom:10px !important">
    <tbody>
    <tr>
        <td colspan="80%">
            <table role="presentation" cellpadding="0" cellspacing="0"
                   style="text-align: center; table-layout: fixed; width: 100%; height: 180px;">
                <tbody>
                <tr style="width: 100%;">
                    <td colspan="65%" style="">
                        <div>  <?php echo $k['name'] ?></div>
                    </td>
                    <td colspan="5%" style="">
                        <div style="height: 20px; width: 2px;  background-color: black; margin: auto;">
                        </div>
                    </td>
                    <td colspan="30%" style="">
                        <div> <?php echo $k['brand'] ?> </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="33%" style="">
                        <div>
                            מחיר ₪&lt;?php echo (float)$k['price'] ?>
                        </div>
                    </td>
                    <td colspan="2%" style="">
                        <div style="height: 20px; width: 2px;  background-color: #e6e6e6; margin: auto;">
                        </div>
                    </td>
                    <td colspan="33%" style="">
                        <?php echo $k['sizeReceived'] ?> מידה
                    </td>
                    <td colspan="2%" style="">
                        <div style="height: 20px; width: 2px;  background-color: #e6e6e6; margin: auto;">
                        </div>
                    </td>
                    <td colspan="32%" style="">
                        <div class="swatch-option color" option-type="1" option-id="<?php echo $k['optionId'] ?>"
                             option-label="<?php echo $k['optionLabel'] ?>">
                            צבע
                        </div>
                    </td>
                </tr>

                <tr>
                    <td colspan="65%" style="">
                        <div style="text-align:right">
                            <?php echo $k['reason'] ?>
                        </div>
                    </td>
                    <td colspan="35%" style="">
                        <div>
                            :סיבת החזרה
                        </div>
                    </td>
                </tr>
                </tbody>
            </table>
        </td>
        <td colspan="20%">
            <div style="display:block;width:104px; height:145px;text-align: center; font-size: 0; background:url('<?php echo $k['image'] ?>') no-repeat center; background-size: cover; position: relative">
            </div>
            <div style="
                position:absolute;
                z-index: 2;
                width: 104px;
                height: 24px;
                opacity: 0.8;
                background-color: #000;
                color: white;
                text-align: center;
                line-height: 24px;">
                פריט החזרה
            </div>
        </td>
    </tr>
    </tbody>
</table>

你能检查一下吗?

于 2021-08-26T14:55:48.290 回答