2013-11-15 80 views
1

我有一个“测试”数据库在这里:图片缺少

http://www.bayingwolf.com/addRecords.asp

如果你点击“添加记录”模式窗体弹出,并在窗体顶部右上角有应该是一个'X'的小PNG图像来关闭表单。

它应该看起来像这样:http://www.ericmmartin.com/projects/simplemodal-demos/(在'基本模式对话框'点击'演示')与X图像到位。

在下载中,作者用他的index.html页在以下方面:

<!-- preload the images --> 
<div style='display:none'> 
<img src='img/basic/x.png' alt='' /> 

,我已经做了完全一样的。当我在桌面上打开他的index.html页面时,我可以看到X图像(我无法在桌面上打开自己的页面,因为它是一个ASP文件),但奇怪的是,当我将他的index.html文件上传到我的服务器我看不到图像。

我已经仔细检查了服务器路径,并将我的X图像放在名为'basic'的文件夹中,该文件夹位于另一个名为'img'的文件夹中。

管辖的图像(basic.css)的定位的CSS如下:

#simplemodal-container a.modalCloseImg { 
    background: url(../img/basic/x.png) no-repeat; 
    width: 25px; 
    height: 29px; 
    display: inline; 
    z-index: 3200; 
    position: absolute; 
    top: -15px; 
    right: -16px; 
    cursor: pointer; 
} 

我的代码是不是原来的代码的副本 - 我有我的页面上的表单,但这不应该影响X图像的位置。

任何建议请(我已经在这至少两天!)?

感谢

+0

在您的网页上只有一个空锚: ''没有在CSS中设置背景('background:none')。 – matewka

+0

也许如果你只为ie6添加ie_css,那么它应该可以工作。 – Aguardientico

回答

0

你在你的问题中提供的CSS没有出现在你的basic.css样式表。取而代之的是,你有这样的事情:

#simplemodal-container a {color:#ddd;} /* <-- bracket closed */ 


{background:url(x.png) no-repeat; /* <-- CSS parse error */ 
width:25px; 
height:29px; 
display:inline; 
z-index:3200; 
position:absolute; 
top:-15px; 
right:-16px; 
cursor:pointer;} 

你可能不想color属性后,关闭该花括号。所以,你的CSS清理到这一点:

#simplemodal-container a.modalCloseImg { 
    color: #ddd; 
    background: url(x.png) no-repeat; 
    width: 25px; 
    height: 29px; 
    display: inline; 
    z-index: 3200; 
    position: absolute; 
    top: -15px; 
    right: -16px; 
    cursor: pointer; 
} 
0

挖掘一下之后,你必须与你的CSS问题。这个CSS规则没有标签。您应该将此ID或类添加到此规则中。这可能无法解决所有问题,但这是朝正确方向迈出的一步。

我只花了一个快速的一瞥,但我认为类应该是.simplemodal-close

#simplemodal-container a {color:#ddd;} 


{background:url(x.png) no-repeat; 
width:25px; 
height:29px; 
display:inline; 
z-index:3200; 
position:absolute; 
top:-15px; 
right:-16px; 
cursor:pointer;} 


#simplemodal-container h3 {color:#84b8d9;} 

应该是:

#simplemodal-container a {color:#ddd;} 


.simplemodal-close { 
    background:url(x.png) no-repeat; 
    width:25px; 
    height:29px; 
    display:inline; 
    z-index:3200; 
    position:absolute; 
    top:-15px; 
    right:-16px; 
    cursor:pointer;} 


#simplemodal-container h3 {color:#84b8d9;} 

编辑: 后甚至更多的调查您的ie.css是压倒你的CSS也在basic.css。所以请确保您的ie.css仅在IE中加载并且也是正确的。

此外,对于背景的网址仍然不正确它在http://www.bayingwolf.com/css/x.png寻找它时,它acttually住在http://www.bayingwolf.com/x.png所以,你的路径应该是../x.png例如:

.simplemodal-close { 
    background:url(../x.png) no-repeat; 
    ... /* rest of declarations */ 
}