问题描述
|
在webkit浏览器中,此页面可以很好地呈现:
http://www.ryanhaywood.com/s/film.html
但是在更新的Firefox中,它的间隔太可怕了。我已经在Firebug中弄乱了好几天,我什至不知道如何在firefox中解决这个问题。
对于上述页面中部署的过时解决方案(表),我深表歉意
谁能发现问题?
提前致谢
瑞安
解决方法
您已经表明用表格创建布局是过时的,我肯定会同意。这是使用
<div>
的解决方案,该解决方案应在所有浏览器中均适用
此处的示例:http://jsfiddle.net/pxfunc/hjgQm/
我按照div的left-orientation
和right-orientation
交替模式对影片进行分类,如下所示:
<div class=\"left-orientation\">
<a href=\"#\"><img src=\"http://placehold.it/250x175/ff0\" alt=\"Director\'s Reel\" /></a>
<p class=\"title\">Director\'s Reel</p>
</div>
<div class=\"right-orientation\">
<a href=\"#\"><img src=\"http://placehold.it/250x175/f00\" alt=\"Nobody\'s Off The Hook\" /></a>
<p class=\"title\">Nobody\'s Off The Hook</p>
</div>
我用边距来控制影片在父div中的显示位置
#films div {width:46%;margin-top:-100px;}
#films .left-orientation {text-align:right;}
#films .right-orientation {margin-left:54%}
您可以向上或向下调整#films div {margin-top:-100px;}
以适合您想要的高度以抵消胶卷