Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/95.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 在没有表格的页面两侧重新调整大小广告_Html_Css - Fatal编程技术网

Html 在没有表格的页面两侧重新调整大小广告

Html 在没有表格的页面两侧重新调整大小广告,html,css,Html,Css,我创建了一个模型,其中包括一个内容区域和左右两侧的两个可扩展/可折叠广告 <table cellspacing="0" cellpadding="0" border="0" style="width:100%;"> <tr> <td style="background:blue; text-align:right;"><img src="http://www.citiesmatter.org/vertical/Sites/%7B

我创建了一个模型,其中包括一个内容区域和左右两侧的两个可扩展/可折叠广告

<table cellspacing="0" cellpadding="0" border="0" style="width:100%;">

    <tr>
        <td style="background:blue; text-align:right;"><img src="http://www.citiesmatter.org/vertical/Sites/%7BC2C0C8B8-8BB9-430D-B364-373386495DE7%7D/uploads/%7B42CEE0EB-39AA-469A-8A71-F6733F2A9172%7D.GIF" style="width:100%;" /></td>
        <td style="width:400px; background:red;">
            <p>Content</p>
        </td>
        <td style="background:blue;"><img src="http://www.citiesmatter.org/vertical/Sites/%7BC2C0C8B8-8BB9-430D-B364-373386495DE7%7D/uploads/%7B42CEE0EB-39AA-469A-8A71-F6733F2A9172%7D.GIF" style="width:100%;" /></td>
    </tr>

</table>

内容


是否可以仅使用div执行此操作?

是…………是的,这是可能的。最简单的方法是将
tr
td
标记更改为
div
标记,并赋予它们CSS样式。进一步的改变可能更好,也可能没有。这不仅是“可能的”,而且是严格推荐的!从新千年开始,布局表就“过时了”;-)媒体查询在这方面很好,但它确实有浏览器限制@user2217162是的,您甚至可以使用
display