简体   繁体   English

CSS在Chrome中有效,但在Firefox中损坏

[英]CSS Works in Chrome, but breaks in firefox

I have written a page in html and css. 我已经用html和CSS编写了页面。 Here is the page: https://wheelertechconsulting.com/page1.html 这是页面: https//wheelertechconsulting.com/page1.html

I designed this page using chrome and when i uploaded to my website, I checked it out in firefox and noticed that that the ul li entrys in the the body div are compressed to the right. 我使用chrome设计了此页面,当我将其上传到我的网站时,我在Firefox中进行了检出,并注意到body div中的ul li条目被压缩到右侧。

What could be causing this error? 是什么导致此错误?

You have many errors in the CSS file CSS文件中有很多错误

There is 6 errors and 12 warnings in your CSS file. 您的CSS文件中有6个错误和12个警告。

I used the CSS online validator to discover it 我使用CSS在线验证器发现了它

Try to fix those problems, maybe solve this problem. 尝试解决这些问题,也许可以解决此问题。

You can see what the problem is and what line it will be in. 您可以查看问题所在以及问题所在。

在此处输入图片说明

在此处输入图片说明

I found the solution, but you must correct the mistakes mentioned in my previous answer 我找到了解决方案,但是您必须纠正我以前的回答中提到的错误

The problem is in : 问题出在:

.featured-images li {
    padding: 0 auto 1% 1%;
    border: .2em solid black;
    margin: 1%;
    ! height: 8em; 
    -webkit-transition: all 0.4s;
    -moz-transition: all 0.4s;
    -ms-transition: all 0.4s;
    -o-transition: all 0.4s;
    transition: all 0.4s ease;
    background: linear-gradient(rgba(0, 255, 255, 0.8), rgba(0, 0, 255, 0.8));

}

If you comment this part of the code : ! height: 8em; 如果你对此有何评论的这部分代码: ! height: 8em; ! height: 8em; the problem will be resolved. 该问题将得到解决。

Next image before comment ! height: 8em; 评论前的下一张图片! height: 8em; ! height: 8em;

在此处输入图片说明

But after the comment ! height: 8em; 但是后评论! height: 8em; ! height: 8em; the appearance will become as in the following image 外观将如下图所示

在此处输入图片说明

This part of the code is in the style file at the line 101. 这部分代码在第101行的样式文件中。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM