在webkit浏览器中,此页面呈现良好:
http://www.ryanhaywood.com/s/film.html
但在最新的firefox中,它的间距非常大。我已经在firebug中折腾了好几天了,我甚至不知道如何在firefox中修复这个问题。
我为前述页面中部署的过时的解决方案(表)道歉
有人能发现问题所在吗?
提前谢谢你,Ryan
发布于 2011-06-01 08:19:09
你曾经说过用表格创建布局已经过时了,我绝对同意。这里有一个使用<div>的解决方案,它应该可以在所有浏览器中工作
示例如下:http://jsfiddle.net/pxfunc/hjgQm/
我已经将电影分类为left-orientation和right-orientation交替模式的div,如下所示:
<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;}调高或调低,以适应胶片偏移所需的高度
https://stackoverflow.com/questions/6194543
复制相似问题