我的元素显示在不同窗口大小的不同位置。如何解决这个问题?

时间:2011-09-19 16:36:03

标签: javascript jquery css

查看我的网站:http://homegym.sg/index.php/weight-tree-rack.html

如果您将鼠标悬停在产品图片下方的“更多视图”字词上,则会显示一个附加图片框。通常它通常出现在中心。但是当我使窗口尺寸变小时,盒子的位置会发生变化。

我正在使用slideviewerpro脚本,我相信它是定位盒子但我无法解决问题。以下是脚本的来源:http://homegym.sg/skin/frontend/default/electronics01-black/js/jquery.slideViewerPro.1.0.js

我相信附加的图片框在div#thumbSlider中,对js文件进行了一些尝试和错误修改,但未能解决问题。

1 个答案:

答案 0 :(得分:1)

确定。首先,您width:660px; product-img-box的div需要添加position:relative;。然后,您需要更改以下规则

.product-view .product-img-box #ui0 {
    position: absolute;
    top: 600px;
    left: 580px;
    height: 60px;
}

.product-view .product-img-box #ui0 {
    position: absolute;
    height: 60px;
    left: 50%;
    margin-left: -200px;
    margin-top: 15px;
}
  

widgets.css:589

然后从那里调整一下。 :)