html - IE兼容性, margin 问题

标签 html css internet-explorer google-chrome margin

我大约一个月前开始在这家公司工作,我一直在努力清理他们的网站。真是一团糟。我的老板使用 IE,但我使用的是 Chrome,只是跑来跑去。 jQuery slider 下方的标题为:“World-Class Mechanical Engineers & Contractors - in Central PA”位于 <td> 的最左侧。 ,但另一个 h1 没有。我希望网站在 Chrome 中呈现与在 IE 中相同的效果,但它在 Chrome 中的显示方式正是我想要的。在 Chrome 中,h1 向右拉入 40px,以缩进。我在这里错过了什么?

http://www.enginuity-llc.com/index.htm

最佳答案

您的标记无效。请注意下面代码片段的第二行是如何将 h1 作为子元素的表格元素。

<tr>
    <td height="50" colspan="2" valign="bottom"><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <h1 style="margin-left:40px">World-Class Mechanical Engineers & Contractors - in Central PA</h1>
        <p style="margin-left:50px; margin-right:75px">Enginuity, LLC is a local firm with decades of global experience in the HVAC and Plumbing sectors. Whether you're looking for a custom process design/build, a retrofit to existing HVAC equipment, service                  and maintenance, or sustainable energy solutions, Enginuity-LLC is your ultimate one-stop partner. What began in 2002 with four mechanical contracting veterans, has grown into an 85-strong firm that still delivers the best design, service, and                         support in the business.</p>
        <p style="margin-left:50px; margin-right:75px">Enginuity-LLC is more than just your local Energy Star Partner & MSCA Green-Star Recipient; we're your solutions provider for the life of your building. We've worked with large enterprises and small businesses, but regardless of what you need, you'll find a level of professionalism and experience unmatched in the HVAC, Plumbing, and Mechanical Contractor market.</p>
        <h1 style="margin-left:40px">We Specialize in:</h1>
            <table style="margin-left:80px">
                <tr>
                    <td width="180px">
                        <ul>
                        <li>HVAC</li>
                        <li>Plumbing</li>
                        <li>Medical Gas Piping</li>
                        <li>Pneumatic</li>
                        <li>Hydraulics</li>
                        <li>Steam</li>
                        <li>Compressed Air</li>
                        <li>Process Piping</li>
                        <li>Refrigeration</li>
                        <li>Utility Piping</li>
                        <li>Ventilation</li>
                        </ul>               
                    </td>
                    <td width="220px">
                        <ul>
                        <li>Centrifugal Chillers</li>
                        <li>Special Environments</li>
                        <li>Specialty Fabrication</li>
                        <li>Backflow Preventers</li>
                        <li>Fire Damper Inspection</li>
                        <li>Sheet Metal / Ductwork</li>
                        <li>New Construction</li>
                        <li>Tenant Fitouts</li>
                        <li>Restoration</li>
                        <li>Turn-Key Design / Build</li>
                        <li>Preventative Maintenance</li>
                        </ul>               
                    </td>
                    <td width="220px">
                        <ul>
                        <li>Energy Retrofits</li>
                        <li>Energy Optimization</li>
                        <li>Computer Rooms</li>
                        <li>Climate Control</li>
                        <li>Radiant Floor Systems</li>
                        <li>Geothermal Systems</li>
                        <li>Energy Audits / Benchmarking</li>
                        <li>Fire Damper Inspection</li>
                        <li>Liebert Certified Data-Aire</li>
                        <li>Electrical Controls</li>
                        <li>DDC</li>
                        </ul>               
                    </td>
                </tr>
            </table>
            <br>
        </td>
    </tr>

<td align="left" width="800px">

此外,如果您在 IE (F12) 中打开开发人员工具,您会注意到它在该区域出现异常(对我来说它显示一个 <> 子级,这是不可能的)

enter image description here

关于html - IE兼容性, margin 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14655251/

相关文章:

html - IE(8,9 和 10)中的表格边框不显示

css - 条纹重复背景在 IE 中滚动时闪烁

html - 使用 jquery UI - 菜单

CSS:2个div并排,一个向右浮动,另一个需要在剩余空间居中

html - 父DIV高度:0px but child element still shows

javascript - 适应浏览器窗口的高度

html - 居中没有宽度的 div block

php - 使用 DOM 将文本节点 append 到 HTML 元素?

html - 如何使 float 操作按钮/内容与 MaterializeCSS 中的两个 div 重叠

jquery - IE跨域jSONP到google apps脚本内容服务