English 中文(简体)
IE为什么会打破我的一页?
原标题:Why does IE break my page?
  • 时间:2011-11-16 20:00:57
  •  标签:
  • html

I ve got a simple page built with for our city s website. Firefox and chrome like it fine... IE breaks it to pieces. I ve tried my code in the W3School tryit editor and it comes out fine there. The page address is: http://www.ci.douglasville.ga.us/index.aspx?NID=509

这里还有犯罪法:

<table cellpadding="4" cellspacing="1" style="text-align: justify; width: 100%; " align="left">
<tbody>
    <tr>
        <td style="text-align: left; vertical-align: top; width: 350px; ">
        <div style="text-align: center;"><span style="line-height: 17px; text-align: -webkit-auto; background-color: rgb(255, 255, 255); "></span></div>
        <span style="line-height: 17px; background-color: rgb(255, 255, 255); "><b style="LINE-HEIGHT: 17px; BACKGROUND-COLOR: rgb(255,255,255)">ADULT KARATE
        FOR ALL AGES &amp; SIZES!</b><br style="LINE-HEIGHT: 17px; BACKGROUND-COLOR: rgb(255,255,255)">
        <br>
        This is the
        chance you&rsquo;ve been waiting for to get healthy and more active!</span><br style="LINE-HEIGHT: 17px; BACKGROUND-COLOR: rgb(255,255,255)">
        <br style="LINE-HEIGHT: 17px; BACKGROUND-COLOR: rgb(255,255,255)">
        <span style="line-height: 17px; background-color: rgb(255, 255, 255); ">The McClure Style
        of TaeKwonDo specializes in safe, affordable, quality training for all adults,
        regardless of age, experience, or fitness level. All are welcome!</span><br style="LINE-HEIGHT: 17px; BACKGROUND-COLOR: rgb(255,255,255)">
        <br style="LINE-HEIGHT: 17px; BACKGROUND-COLOR: rgb(255,255,255)">
        <span style="line-height: 17px; background-color: rgb(255, 255, 255); ">Our Black-Belt
        Instructors tailor all classes to meet your specific needs and skill
        level:</span><span style="line-height: 17px; background-color: rgb(255, 255, 255); "> </span><span style="background-color: rgb(255, 255, 255); text-align: -webkit-auto; line-height: 17px; ">
        </span></td>
        <td style="border-top-style: solid; border-top-width: thin; border-top-color: rgb(44, 75, 129); border-right-style: solid; border-right-width: thin; border-right-color: rgb(44, 75, 129); border-bottom-style: solid; border-bottom-width: thin; border-bottom-color: rgb(44, 75, 129); border-left-style: solid; border-left-width: thin; border-left-color: rgb(44, 75, 129); background-color: rgb(229, 225, 226); width: 205px; text-align: left; vertical-align: top; ">
        <div style="text-align: left;"><span style="font-weight: bold; line-height: 17px; color: rgb(128, 104, 39); ">Contact</span></div>
        <span style="line-height: 17px; background-color: rgb(229, 225, 226); ">
        <span style="line-height: 17px; background-color: rgb(229, 225, 226); ">Tommy Nicholson,
        Instructor<br>
        <div>Ph:
        770-942-0018<br>
        <br>
        Denver Thompson, Instructor<br>
        770-595-1245</div>
        </span>
        <div class=""><br>
        <b>Hunter Park Community Center</b></div>
        </span><span style="line-height: 17px; text-align: left; ">
        8830 Gurley Road<br>
        Douglasville, Ga 30134<br>
        To sign up call 770-920-3007<br>
        </span></td>
    </tr>
    <tr>
        <td style="text-align: left; vertical-align: top; " colspan="2">
        <ul>
            <li><span style="line-height: 17px; ">Self-Defense Training</span></li>
            <li><span style="line-height: 17px; ">Fitness, Flexibility, Coordination, &amp; Balance Training</span></li>
            <li><span style="line-height: 17px; ">Rank Advancements at Your Own Pace</span></li>
            <li><span style="line-height: 17px; ">Advanced Training in TaeKwonDo and Hapkido for Experienced Skill Levels</span></li>
        </ul>
        </td>
    </tr>
    <tr>
        <td style="text-align: left; vertical-align: top; " colspan="2">&nbsp;
        <table width="100%" cellpadding="2" cellspacing="1">
            <tbody>
                <tr>
                    <td style="text-align: left;width: 280px; vertical-align: top; "><b>Adult Classes</b><br>
                    Registration: Every Tuesday (ongoing)<br>
                    <br>
                    Classes: Tuesdays, 7:30-8:30pm<br>
                    Cost: $50.00 per month<br>
                    <br>
                    </td>
                    <td style="width: 280px; text-align: left; vertical-align: top; "><b style="text-align: left; "></b><b>Karate for Kids</b><br>
                    Registration: Winter Classes begin Tuesday, <span class="Apple-tab-span" style="white-space: pre; ">            </span>November 15, 2011<br>
                    Classes: Tuesdays, 6:30-7:30 pm<br>
                    Cost: $60.00 per month for 8 week course<span style="text-align: -webkit-auto; "></span></td>
                </tr>
            </tbody>
        </table>
        </td>
    </tr>
</tbody>

问题回答

您正在使用IE7型代号,因此,您的网页显示的是IE7的助推引擎。 为什么不使用IE9类,例如:

<!DOCTYPE html>

<><>Edit>: 当然,你想要在IE7中适当展示,因此你仍然希望解决这个问题。 在“爱幼学校”单元中,你有一个带white-space: pre;的空间。 这造成了你的问题。 最容易的固定点是,在前面插入一个<代码><br/>。


尽管如此,你的网页使用一些与网络设计最佳做法相悖的布局技术。 你们正在使用表格控制布局和列报方式,这至少可以说是讽刺的,但具有讽刺意味的是,你没有用表格显示该页的表格。 我也特别劝阻把双脚城市的图像分一半。

Since the W3 Validator finds several problems, you should consider yourself lucky that only IE does not display the page properly. The validator also gives information on what you can do to fix the problems.





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签