2017-11-03 2 views
0

私はHTMLの電子メールを作成していますが、これらを読み込むプログラムは別々のCSSファイルを受け入れないので、すべてがインラインでなければなりません。何らかの理由でテーブルの余白が機能していません。私が必要とするのは、テーブルの底と次のテーブルとの間の隙間だけです。(HTML)テーブルのマージンボトム?

<table width="600" margin-bottom="50" cellpadding=8 cellspacing=0 border=0> 
 
    //contents of table 
 
</table> 
 

 
<table width="600" cellpadding="0" cellspacing="0" border="0"> 
 
    //contents of next table 
 
</table>

すべてで作成された隙間がない:私はこれまで持って何

これは動作します:私もパディング下を試してみました

<table width="600" cellpadding=8 cellspacing=0 border=0> 
 
    //contents of table 
 
</table> 
 

 
<br> 
 

 
<table width="600" cellpadding="0" cellspacing="0" border="0"> 
 
    //contents of next table 
 
</table>

、いずれか何もしません。

<br>は唯一の方法ですか?厄介なようです。

+1

。私はすでにインライン・スタイリング(文字通り私の質問の最初の文)と表を使用しています。 – Windbrand123

答えて

3

マージンを使用していた方法が間違っていました。マージンはスタイル属性の内側になければなりません。他の属性は、通常は表に対して直接しか使用できない表固有の属性です。あなたはマージンを使うことができますが、もし私があなただったら、<br/>タグを使用します。これは、常にすべてのデバイスで同じ方法でレンダリングされるためです。 Outlookのようないくつかの電子メールシステムでは余裕が少しあります。私の質問とは全く無関係である

<table width="600" style="margin-bottom:50px;" cellpadding=8 cellspacing=0 border=0> 
 
    //contents of table 
 
</table> 
 

 
<table width="600" cellpadding="0" cellspacing="0" border="0"> 
 
    //contents of next table 
 
</table>