2017-08-04 3 views
0

次のコードでビデオ間にパディングを追加しようとしています。任意のポインタやヒント?:ビデオギャラリのセル間にパディングを追加する

<table width="100%;"> 
 
    <tbody> 
 
    <tr> 
 
    <td align="left" valign="top" width="50%"> 
 
    <div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;"><iframe style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;" src="https://www.youtube.com/embed/SxK8XBnYZRk?rel=0&amp;showinfo=0" width="300" height="150" scrolling="no" allowfullscreen="allowfullscreen"></iframe></div> 
 
    <p style="text-align: center;">Battle of Whitehall by <a href="http://www.rockinpaddy.com/">Rockinpaddy</a>, London</p> 
 
    </td> 
 
    <td align="left" valign="top" width="50%"> 
 
    <div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;"><iframe style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;" src="https://www.youtube.com/embed/uS0-xSoxH1o?rel=0&amp;showinfo=0" width="300" height="150" scrolling="no" allowfullscreen="allowfullscreen"></iframe></div> 
 
    <p style="text-align: center;">Which Side Are You On by <a href="http://www.rockinpaddy.com/">Rockinpaddy</a>, London</p> 
 
    </td> 
 
    </tr> 
 
    </tbody> 
 
    </table>

+0

あなたが間にパディングによって何を意味していますビデオ? –

+2

レイアウト用にテーブルを使用しないでください。表形式のデータには表を使用します。キンダーは90年代後半からマントラでした – j08691

答えて

0

は、このようなtd要素にいくつかのパディングを入れてみてください:

td { 
 
    padding: 0 10px; 
 
}
<table width="100%;"> 
 
<tbody> 
 
<tr> 
 
<td align="left" valign="top" width="50%"> 
 
<div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;"><iframe style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;" src="https://www.youtube.com/embed/SxK8XBnYZRk?rel=0&amp;showinfo=0" width="300" height="150" scrolling="no" allowfullscreen="allowfullscreen"></iframe></div> 
 
<p style="text-align: center;">Battle of Whitehall by <a href="http://www.rockinpaddy.com/">Rockinpaddy</a>, London</p> 
 
</td> 
 
<td align="left" valign="top" width="50%"> 
 
<div style="left: 0; width: 100%; height: 0; position: relative; padding-bottom: 56.2493%;"><iframe style="border: 0; top: 0; left: 0; width: 100%; height: 100%; position: absolute;" src="https://www.youtube.com/embed/uS0-xSoxH1o?rel=0&amp;showinfo=0" width="300" height="150" scrolling="no" allowfullscreen="allowfullscreen"></iframe></div> 
 
<p style="text-align: center;">Which Side Are You On by <a href="http://www.rockinpaddy.com/">Rockinpaddy</a>, London</p> 
 
</td> 
 
</tr> 
 
</tbody> 
 
</table>

+0

こんにちは、 スニペットで動作するように見える - ありがとう!あなたはこのtd要素コードがどこに行くのか明確にすることができますか?私が

の直前に置くと、テキストとして表示されます。それは​​に属していますか?ありがとう、ごめんなさい。 – Alicia

関連する問題