【问题标题】:Gallery images wrap in IE but not in other browsers图库图像在 IE 中包装,但在其他浏览器中不包装
【发布时间】:2011-06-01 03:49:17
【问题描述】:

情况如下:my WordPress Gallery looks fine 在 Firefox、Safari 等中但在 IE(在 Windows 下)上运行时,图库中的最后一张图片会换行到下一行。

到目前为止,我已经尝试调整画廊宽度、填充、内联、块和更改列数,但均无济于事。该行有足够的空间来放置图像。

以下是我认为相关的 CSS 位:

#gallery-1 {
   float: right;
   height: 70px;
   margin: 1px;
   padding-bottom: 20px;
   width: 480px;
}

.gallery-icon {
   width: 55px;
   padding: 3px;
   margin: 0;
   float: left;
}

.gallery-columns-7 {
   padding: 0;
   margin: 0;
}

.gallery-item { 
   float: left;
   margin: 3px;
   padding: 0 2px 0 0;
   width: 55px;
}

有人有什么想法吗?

【问题讨论】:

  • 你运行的是哪个版本的IE?

标签: css wordpress gallery word-wrap


【解决方案1】:

解决这个问题

<dl class="gallery-item">
{
 margin-right: 3px;
 margin-left: 3px;
}

要么将其更改为 1px 或删除它们,要么仅删除 styles.css 第 1219 行中的右边距或左边距

【讨论】:

  • 如果它解决了您的问题,您可以将答案标记为正确!
【解决方案2】:

尝试在 .gallery-item 类中设置 overflow: hidden;

【讨论】:

  • 哇。有人那么讨厌这个答案吗?有那么没用吗?否决票通常用于表示某个答案非常不准确或具有误导性,以至于不应该考虑。
  • 应该有信息说明谁对答案投了反对票以及他这样做的原因。
  • 好吧,我将投票给这个答案。所以至少反对票是平的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-08-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-08-13
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多