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

时间:2011-06-03 16:27:58

标签: html css background background-image

我正在努力让我的室内背景图像在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 />

2 个答案:

答案 0 :(得分:0)

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

自:

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

要:

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

答案 1 :(得分:0)

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

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

希望这有帮助。