wordpress组合画廊中的图像之间的空间

时间:2013-11-08 08:41:29

标签: css wordpress image-gallery

我正在尝试微调我的website,但我无法弄清楚如何在我的任何投资组合图库(example)内增加图像之间的空间。

我已经浏览了style.css文件,但我必须遗漏一些东西。垂直间距看起来没问题,但没有水平间距,图像似乎粘在一起。

我正在使用wordpress与“Folio White”主题。

5 个答案:

答案 0 :(得分:2)

只需将此类添加到任何css文件中:并在页眉或页脚中添加该css以获得最佳效果

.gallery-item {
    margin-top: 0;
    margin-left: 10px;
}

由于

答案 1 :(得分:0)

您可以在主题的style.css中创建新课程

#portfolio-wrap .col{margin-top: 1%;}

答案 2 :(得分:0)

如果您使用右键单击并检查元素,这很容易,您只需将其添加到style.css中:

.gallery-item {
    margin-top: 0;
    margin-left: 10px;
}

确保在插件中使用的样式之前加载样式。

答案 3 :(得分:0)

对于垂直边距,您可以通过以下方法之一添加一个类以匹配您所需的边距:

.only-top {margin-top:5px}
.only-bottom {margin-bottom:5px}
.top-and-bottom {margin-top:5px; margin-bottom:5px}
.overall {margin:5px}
.top-and-bottom-autosides {margin:5px auto}
.specific {margin:5px 4px 5px 4px} //note the order is: top right bottom left

答案 4 :(得分:0)

You can use bootsrtap method, like in rows and containers. This method better, cause it stretches the gallery width of the container.

.gallery {
  margin: -15px;
}

.gallery-item {
  padding: 15px;
}