Firefox和Chrome之间的CSS差异

时间:2013-10-15 15:41:18

标签: html css

我遇到一些问题,让一个特定元素在Firefox和Chrome中看起来一样。

此屏幕截图是它在Firefox中的外观(以及它应该如何显示 - 一个包含日期的框)。

Firefox - correct example

此屏幕截图是Chrome浏览器的外观。

Chrome - incorrect example

我一直在玩Firebug尝试修复它,但无论我做什么,我都无法像在Firefox上一样工作。有人能帮忙吗?

页面位于http://zachlockwood.com/wp - 谢谢。

相关元素的HTML / CSS:

.bit-events-narrow .bit-date .bit-event-data { text-align: center; text-transform: uppercase; font-size: 16px !important; background: #552412 !important; color: #f0f0e6 !important; line-height: 18px !important; padding-top: 8px !important; padding-bottom:5px !important; padding-left: 3px !important; padding-right: 3px !important; font-family: 'Conv_Haymaker' !important; height: 40px !important; width: 40px !important; } 

.bit-date { text-align: center !important;  line-height: 20px !important; }  

.bit-date a { width: 50px !important; background: #552412 !important; }  

<td class="bit-date">
<a class="bit-event-data" href="http://www.bandsintown.com/event/7082285?app_id=wpjs_zachlockwood.com&artist=Zach+Lockwood&came_from=39" target="_blank" data-bit-event-id="7082285" style="font-family: 'Conv_Haymaker'; font-size: 16px; font-weight: 400; font-style: normal; color: rgb(240, 240, 230); text-transform: uppercase; text-decoration: none; letter-spacing: normal; word-spacing: 0px; line-height: 18px; text-align: center; vertical-align: baseline; direction: ltr; background-color: rgb(85, 36, 18); background-image: none; background-repeat: repeat; background-position: 0% 0%; background-attachment: scroll; opacity: 1; width: 40px; height: 40px; top: auto; right: auto; bottom: auto; left: auto; margin: 0px; padding: 8px 3px 5px; border-width: 0px; border-color: rgb(240, 240, 230); border-style: none; position: static; display: inline; visibility: visible; z-index: auto; overflow: visible; white-space: normal; clip: auto; clear: none; cursor: pointer; list-style: disc outside none; marker-offset: auto;">Nov 16</a>
</td>

**请注意,HTML是由BandsInTown插件生成的,我没有添加。

1 个答案:

答案 0 :(得分:3)

您的a标记应该是block

试试这个:

.bit-date a { display: block!important; }