我不知道如何编码....所以有人可以帮助我消除这两个块之间的空白吗?我正在写时事通讯。另外,是否可以将第二部分的图像移到左侧,将文本移到右侧?谢谢!!
<!-- SECTION - POST 1 CUP --> <table align="center" width="800" class="container footer float-center not-outlook" style="Margin:0 auto;background:#fefefe;border-collapse:collapse;border-spacing:0;float:none;height:450px;margin:0 auto;padding:30px 0 0!important;text-align:center;vertical-align:top;" align="center" class="container post-before-footer float-center"> <tbody> <tr style="padding:0;text-align:left;vertical-align:top"> <td style="-moz-hyphens:auto;-webkit-hyphens:auto;Margin:0;border-collapse:collapse!important;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;hyphens:auto;line-height:1.3;margin:0;padding:0;text-align:left;vertical-align:top;word-wrap:break-word"> <table class="row" style="border-collapse:collapse;border-spacing:0;display:table;padding:0;position:relative;text-align:left;vertical-align:top;width:100%"> <tbody> <tr style="padding:0;text-align:left;vertical-align:top"> <th class="mobile-blog-posts blog-posts small-12 large-6 columns first" style="Margin:0 auto;background:#fff;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;line-height:1.3;margin:0 auto;max-width:440px;padding:0!important;text-align:left;width:384px"> <table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%"> <tbody> <tr style="padding:0;text-align:left;vertical-align:top"> <th style="Margin:0;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;text-align:left"> <table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%"> <tbody> <tr style="padding:0;text-align:left;vertical-align:top"> <td class="mobile-blog-posts" style="-moz-hyphens:auto;-webkit-hyphens:auto;Margin:0;border-collapse:collapse!important;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;hyphens:auto;line-height:1.3;margin:0;padding:0;padding-left:55px;padding-top:42px;text-align:left;vertical-align:top;word-wrap:break-word"> {% widget_block rich_text "section_before_footer" overrideable=True, label='Section before footer - Text' %} {% widget_attribute "html" %} <h4 style="Margin:0;Margin-bottom:10px;color:{{widget_data.color_2.color}};font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:23px;font-weight:700;line-height:28px;margin:20px 0 20px;margin-bottom:20px;padding:0;text-align:left;word-wrap:normal">Meet Our Team.</h4> <p style="Margin:0;Margin-bottom:0px;color:{{widget_data.color_3.color}};font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:300;line-height:24px;margin:0;margin-bottom:0px;padding:0;text-align:left">Text placeholder.</p> {% end_widget_attribute %} {% end_widget_block %} </td> </tr> </tbody> </table> </th> </tr> </tbody> </table> </th> <th class="image-before-footer small-12 large-6 columns last" style="Margin:0 auto;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;line-height:1.3;margin:0 auto;padding:0;padding-bottom:0px;padding-left:8px;padding-right:16px;text-align:left;width:384px;background:#fff;"> <table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%"> <tbody> <tr style="padding:0;text-align:left;vertical-align:top"> <th style="Margin:0;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;text-align:left"> <table style="border-collapse:collapse;border-spacing:0;padding:-0;text-align:left;vertical-align:top;width:100%"> <tbody> <tr style="padding:0;text-align:left;vertical-align:top"> <td class="mobile-blog-posts" style="-moz-hyphens:auto;-webkit-hyphens:auto;Margin:0;border-collapse:collapse!important;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;hyphens:auto;line-height:1.3;margin:0;padding:0;padding-right:55px;text-align:left;vertical-align:top;word-wrap:break-word;padding:20px 20px 20px;"> <img src="{% image_src 'section_before_src' label='Section before footer - Image (345px/340px)', src='https://cdn2.hubspot.net/hubfs/685080/HubSpot_Template_Marketplace/Turbo_Vanadyl/images/mailings/post-before-footer.png', no_wrapper=True %}" alt="Image for own posts" style="-ms-interpolation-mode:bicubic;clear:both;display:block;height:360px;max-width:100%;outline:0;text-decoration:none;width:auto;margin:0 auto;"> </td> </tr> </tbody> </table> </th> </tr> </tbody> </table> </th> </tr> </tbody> </table> </td> </tr> </tbody> </table> <!-- SECTION - POST 2 CUP --> <table align="center" width="800" class="container footer float-center not-outlook" style="Margin:0 auto;background:#fefefe;border-collapse:collapse;border-spacing:0;float:none;height:20px;margin:0 auto;padding:0px 0 0!important;text-align:center;vertical-align:top;" align="center" class="container post-before-footer float-center"> <tbody> <tr style="padding:0;text-align:left;vertical-align:top"> <td style="-moz-hyphens:auto;-webkit-hyphens:auto;Margin:0;border-collapse:collapse!important;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;hyphens:auto;line-height:1.3;margin:0;padding:0;text-align:left;vertical-align:top;word-wrap:break-word"> <table class="row" style="border-collapse:collapse;border-spacing:0;display:table;padding:0;position:relative;text-align:left;vertical-align:top;width:100%"> <tbody> <tr style="padding:0;text-align:left;vertical-align:top"> <th class="mobile-blog-posts blog-posts small-12 large-6 columns first" style="Margin:0 auto;background:#fff;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;line-height:1.3;margin:0 auto;max-width:440px;padding:0!important;text-align:left;width:384px"> <table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%"> <tbody> <tr style="padding:0;text-align:left;vertical-align:top"> <th style="Margin:0;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;text-align:left"> <table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%"> <tbody> <tr style="padding:0;text-align:left;vertical-align:top"> <td class="mobile-blog-posts" style="-moz-hyphens:auto;-webkit-hyphens:auto;Margin:0;border-collapse:collapse!important;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;hyphens:auto;line-height:1.3;margin:0;padding:0;padding-left:55px;padding-top:42px;text-align:left;vertical-align:top;word-wrap:break-word"> {% widget_block rich_text "section_before_footer" overrideable=True, label='Section before footer - Text' %} {% widget_attribute "html" %} <p style="Margin:0;Margin-bottom:0px;color:{{widget_data.color_3.color}};font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:300;line-height:24px;margin:0;margin-bottom:0px;padding:0;text-align:left">Text placeholder</p> {% end_widget_attribute %} {% end_widget_block %} </td> </tr> </tbody> </table> </th> </tr> </tbody> </table> </th> <th class="image-before-footer small-12 large-6 columns last" style="Margin:0 auto;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;line-height:1.3;margin:0 auto;padding:0;padding-bottom:0px;padding-left:8px;padding-right:16px;text-align:left;width:384px;background:#fff;"> <table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%"> <tbody> <tr style="padding:0;text-align:left;vertical-align:top"> <th style="Margin:0;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;line-height:1.3;margin:0;padding:0;text-align:left"> <table style="border-collapse:collapse;border-spacing:0;padding:0;text-align:left;vertical-align:top;width:100%"> <tbody> <tr style="padding:0;text-align:left;vertical-align:top"> <td class="mobile-blog-posts" style="-moz-hyphens:auto;-webkit-hyphens:auto;Margin:0;border-collapse:collapse!important;color:#0a0a0a;font-family: 'Helvetica Neue', Helvetica, 'Trebuchet MS', Geneva, Tahoma, Arial, sans-serif; font-size:16px;font-weight:400;hyphens:auto;line-height:1.3;margin:0;padding:0;padding-right:55px;text-align:left;vertical-align:top;word-wrap:break-word;padding:30px 20px 20px;"> <img src="{% image_src 'section_before_src' label='Section before footer - Image (345px/340px)', src='https://cdn2.hubspot.net/hubfs/685080/HubSpot_Template_Marketplace/Turbo_Vanadyl/images/mailings/post-before-footer.png', no_wrapper=True %}" alt="Image for own posts" style="-ms-interpolation-mode:bicubic;clear:both;display:block;height:360px;max-width:100%;outline:0;text-decoration:none;width:auto;margin: 0 auto;"> </td> </tr> </tbody> </table> </th> </tr> </tbody> </table> </th> </tr> </tbody> </table> </td> </tr> </tbody> </table>`
最佳答案
将第一个图像高度更改为100%
<img src="{% image_src 'section_before_src' label='Section before footer - Image (345px/340px)', src='https://cdn2.hubspot.net/hubfs/685080/HubSpot_Template_Marketplace/Turbo_Vanadyl/images/mailings/post-before-footer.png', no_wrapper=True %}" alt="Image for own posts" style="-ms-interpolation-mode:bicubic;clear:both;display:block;height:100%;max-width:100%;outline:0;text-decoration:none;width:auto;margin:0 auto;">
这会照顾盒子之间的空间
关于html - 如何删除这两个块之间的空白?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/45644983/