内部内容背景不会在 IE 中显示

发布于 2024-11-13 09:57:36 字数 1522 浏览 3 评论 0原文

我正在努力让我的内部背景图像在 IE 中显示,在 FF 和 chrome 中运行良好。想不通。

    <div id="banner">
        <div id="banner-image"><cms:CMSEditableImage ID="BannerPhoto" runat="server" ImageHeight="284" ImageWidth="892" /></div>
    </div>

    <div id="interior-content-block">
        <div id="repeating-content">
            <div id="interior-content">
                <cc1:CMSEditableRegion ID="txtMain" runat="server" DialogHeight="312" RegionType="HtmlEditor" RegionTitle="Main Content" />
            </div>
        </div>

        <div id="side-navigation">
            <cms:CMSListMenu ID="CMSListMenuSub" runat="server" HighlightAllItemsInPath="true" ClassNames="CMS.MenuItem" RenderCssClasses="true" CSSPrefix="side1;side2" DisplayHighlightedItemAsLink="true" Path="/{0}/%"/>
        </div>
        <div style="clear: both;"></div>

#repeating-content-landing
{
    float: left;
    margin: 0px 0px 0px 40px;
    background: #959398 url(../site-images/landing-page/final-landing-page-design.jpg);
    width: 820px;
}

#interior-content
{
    padding: 32px 32px 32px 32px;
    background: #999999 url(../site-images/interior-content.gif)repeat-y;
    min-height: 312px;
}

#interior-content-landing
{
    padding: 0px 0px 0px 0px;
    background: #999999 url(../site-images/landing-page/final-landing-page-design.jpg) no-repeat;
    min-height: 700px;
}

<style />

I am struggling to get my interior background image to display in IE, works fine in FF and chrome. Cant figure it out.

    <div id="banner">
        <div id="banner-image"><cms:CMSEditableImage ID="BannerPhoto" runat="server" ImageHeight="284" ImageWidth="892" /></div>
    </div>

    <div id="interior-content-block">
        <div id="repeating-content">
            <div id="interior-content">
                <cc1:CMSEditableRegion ID="txtMain" runat="server" DialogHeight="312" RegionType="HtmlEditor" RegionTitle="Main Content" />
            </div>
        </div>

        <div id="side-navigation">
            <cms:CMSListMenu ID="CMSListMenuSub" runat="server" HighlightAllItemsInPath="true" ClassNames="CMS.MenuItem" RenderCssClasses="true" CSSPrefix="side1;side2" DisplayHighlightedItemAsLink="true" Path="/{0}/%"/>
        </div>
        <div style="clear: both;"></div>

#repeating-content-landing
{
    float: left;
    margin: 0px 0px 0px 40px;
    background: #959398 url(../site-images/landing-page/final-landing-page-design.jpg);
    width: 820px;
}

#interior-content
{
    padding: 32px 32px 32px 32px;
    background: #999999 url(../site-images/interior-content.gif)repeat-y;
    min-height: 312px;
}

#interior-content-landing
{
    padding: 0px 0px 0px 0px;
    background: #999999 url(../site-images/landing-page/final-landing-page-design.jpg) no-repeat;
    min-height: 700px;
}

<style />

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

放飞的风筝 2024-11-20 09:57:37

我相信除非属性值间隔正确,否则 CSS 无法正确解析。您的网址和重复之间没有空格:

发件人:

background: #999999 url(../site-images/interior-content.gif)repeat-y;

收件人:

background: #999999 url(../site-images/interior-content.gif) repeat-y;

I believe the CSS does not parse correctly unless the property values are spaced out properly. You have no space between your url and repeat:

From:

background: #999999 url(../site-images/interior-content.gif)repeat-y;

To:

background: #999999 url(../site-images/interior-content.gif) repeat-y;
冬天旳寂寞 2024-11-20 09:57:37

另一件要尝试的事情是将各个项目分开:

background-image: url(images/yourImage.png); 
background-repeat: no-repeat; 
background-position: center

希望这会有所帮助。

The other thing to try is to break the individual items apart:

background-image: url(images/yourImage.png); 
background-repeat: no-repeat; 
background-position: center

Hope this helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文