1

youtubeビデオをに埋め込むにはどうすればよいtableですか?

左右の列rowsの高さを2にし、中央の列のセル数を2にし、下のセルにビデオを、上のセルにテキストを入れたいのですが、そこに移動する方法がわかりません。

<div class="cbody">
        <table class="ctable">
            <tr>
                <td rowspan="2" style="width:105px"><img class="cimg1" src="meh.png" alt=" " width="100px" height="500px"></td>
                <td><p class="ctxt">
                my text here
                </p></td>
                <td rowspan="2" style="width:105px"><img class="cimg2" src="meh.png" alt=" " width="100px" height="500px"></td>
            </tr>
            <tr>
            <iframe width="420" height="315" src="http://www.youtube.com/embed/xI_6oLPC-S0" frameborder="0" allowfullscreen></iframe>
            </tr>
        </table>
    </div>

およびCSS..。

.cbody {
width:800px;
margin-left: auto;
margin-right: auto;
border-style:solid;
border-width:3px;
}

.cimg1 {
padding-left:5px;
padding-top:5px;
padding-bottom:5px;
float:left;
}

.cimg2 {
padding-left:5px;
padding-top:5px;
padding-bottom:5px;
float:right;
}

.ctxt {
margin-left:5px;
margin-right:5px;
text-align:center;

}

.ctable {
width:800px;
margin-left:auto;
margin-right: auto;
border-style:solid;
border-width:2px;
}
4

1 に答える 1

2

<td>の周りにタグを追加する必要があります<iframe>

<td>
    <iframe width="420" height="315" src="http://www.youtube.com/embed/xI_6oLPC-S0" frameborder="0" allowfullscreen>
    </iframe>
</td>

<th>また、テキストを配置する場所の代わりに使用することも検討する必要があり<td>ます。

于 2013-03-21T02:19:11.477 に答える