FancyBox填充(顶部和底部)

时间:2014-10-16 19:25:34

标签: html css fancybox padding fancybox-2

我在我的图片库中添加了精美的盒子,默认情况下每张图片的左侧和右侧都有空间,但顶部和底部都没有。我尝试使用CSS添加填充但没有任何变化。 这就是我所做的:

#fancy {
    padding-top: 25px;
    padding-bottom: 25px;
}

这是HTML:

<div id="fancy" class="container ">
    <div class="page-title">
        <h1>Church <span>Visit</span></h1>
    </div>

    <a rel="gallery" title="Takoosh Hovsepian speaking at Skyline Church with Jim Garlow & Dr. James Dobson" class="fancybox" href="images/gallery/church_visit/770 x 510_pic2.jpg"><img src="images/gallery/church_visit/thumbs/220x132_pic2.jpg" alt=""/></a>
    <a rel="gallery" title="Leading worship at Calvary Church Pennsylvania " class="fancybox" href="images/gallery/church_visit/770 x 510_pic3.jpg"><img src="images/gallery/church_visit/thumbs/220x132_pic3.jpg" alt=""/></a>
    <a rel="gallery" title="Joseph Hovsepian speaking at Downey, CA Christian school" class="fancybox" href="images/gallery/church_visit/770 x 510_pic4.jpg"><img src="images/gallery/church_visit/thumbs/220x132_pic4.jpg" alt=""/></a>
    <a rel="gallery" title="Andre Hovsepian speaking at youth conference" class="fancybox" href="images/gallery/church_visit/770 x 510_pic6.jpg"><img src="images/gallery/church_visit/thumbs/220x132_pic6.jpg" alt=""/></a>
    <a rel="gallery" title="Takoosh Hovsepian speaking at Open Doors women conference in Netherlands" class="fancybox" href="images/gallery/church_visit/770 x 510_pic5.jpg"><img src="images/gallery/church_visit/thumbs/220x132_pic5.jpg" alt=""/></a>

</div>

我还尝试更改jquery.fancybox.css上的填充,但仍然没有任何变化。我不确定我是否在错误的位置添加填充,或者问题是其他问题。

Here is my gallery

1 个答案:

答案 0 :(得分:0)

试试这个:

 #fancy{
  margin-top: 25px;
  margin-bottom: 25px;
 }