[英]CSS absolute positioning issue in IE and Firefox but not Chrome - Wordpress Template
[英]issue with css positioning in wordpress columns
将标题放在图片上方时出现问题。 图片在一列中,共有4列。 前三列似乎工作正常,但是到最后一列时,它看起来根本不正确,我觉得这可能与wordpress css有关? 我试图将css添加到正确定位它的最后一列,但是宽度不正确...我很困惑。 这可能是一个简单的修复方法,但我似乎无法弄清楚
这是网站http://aminkhalil.com的链接
这是我的HTML代码
[fourcol_one]
<a href="#" class="caption">
<img class="hover" alt="Services" src="http://growinggood.com/wp-content/uploads/2014/02/billboard-slider-images.jpg" />
<span class="caption">Services</span></a>
[/fourcol_one]
[fourcol_one]
<a href="#" class="caption">
<img class="hover" alt="Keep Healthy" src="http://growinggood.com/wp-content/uploads/2014/02/billboard-slider-images.jpg" />
<span class="caption">Keep Healthy</span></a>
[/fourcol_one]
[fourcol_one]
<a href="#" class="caption">
<img class="hover" alt="Meet The Staff" src="http://growinggood.com/wp-content/uploads/2014/02/billboard-slider-images.jpg" />
<span class="caption">Meet The Staff</span></a>
[/fourcol_one]
[fourcol_one_last]
<a href="#" class="caption">
<img class="hover" alt="Portal" src="http://growinggood.com/wp-content/uploads/2014/02/billboard-slider-images.jpg" />
<span class="caption">Portal</span></a>
[/fourcol_one_last]
这是我的CSS
a.caption{
position:relative;
}
a:hover img.hover{
opacity: 0.5;
filter: alpha(opacity=530);
}
span.caption{
color: #fff !important;
position: absolute;
bottom: 0;
left: 2%;
padding: 1.9%;
width: 93%;
background-color: rgba(0,0,0,0.5);
}
.last span.caption{
bottom: 22px;
left: 3px;
}
任何帮助表示赞赏。 先感谢您!!
我想到了!! 我在HTML中有一些额外的空格/中断,这使得前3列与后3列有所不同。 我在span.caption中添加/更改了一些内容,并删除了.last span.caption的CSS
span.caption{
color: #fff !important;
position: absolute;
padding: 1.9%;
width: 93.5%;
background-color: rgba(0,0,0,0.5);
display: block; /* added */
bottom: 0; /* changed */
left: 3px; /* changed */
}
感谢任何可能做过任何研究的人!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.