[英]Can't figure out why the page looks horrible in Firefox? Looks good in Chrome/IE
[英]Specific Element positioned correctly in IE and Chrome, but not in Firefox…and I can't figure out why?
我最近一直在閱讀有關跨瀏覽器的兼容性的書,並且學到了很多東西,但是我還不能解決這個特定的問題。
在我在Chrome和IE中建立的網站www.paintnomorect.com上,聯系表單正確位於左上角。 但是在Firefox中,它被放置在主圖像下方,並且我不知道它是定位問題,邊距,浮動還是其他問題...我嘗試搜索答案,但大多數似乎與特定問題有關實例,但我還沒有找到一個有幫助的實例。
有人可以幫我找出造成此問題的原因以及如何解決此問題嗎? 並且有解決此類問題的好方法,這樣我就可以找出導致問題的原因嗎?
刪除float
和margin-top
並使用此CSS:
.contentAreaC .jumbotron.has-formbuilder .module-container .formbuilder {
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
這將使表格垂直對齊,並一直保持在左側。 同樣,您可以::before
用於垂直對齊表單::before
刪除:::。 我認為float
事情搞砸了。
嘗試僅針對FireFox並更改CSS樣式的垂直部分:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
@-moz-document url-prefix() {
h1 {
color: red;
}
}
</style>
</head>
<body>
<h1>This should be red in FF</h1>
</body>
</html>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.