Linux 操作系统下 Firefox 的 css 元素边距
我设计了这个网站,但我无法以适合 Firefox / Linux 操作系统用户正确呈现的方式放置元素 ( div#endinglogo )。
我正在使用 Windows 7 中的所有浏览器,尽管设计看起来应该是这样在使用我的操作系统的 Firefox 中,我修复 Firefox/Linux 的猜测并没有起作用。
我的问题是为元素 div#endinglogo 提供的适当边距是多少,以便它出现在它应该出现的位置。
我在下面附上了两张图片。
第一个显示了我希望标题的外观: http://postimage.org/image/rsd27dvo/
第二个显示了我如何被告知它出现在使用linux操作系统时的浏览器firefox: http://postimage.org/image/rtgr3pqc/
我有一个提供 firefoxLinux.css 的 php 文件文件,或者至少这是意图。当您通过firefox/linux看到这个网站时,这个文件是否被加载?
感谢您的帮助
I designed this website, and I have been unable to place an the element ( div#endinglogo ) in a way that renders properly for firefox / Linux operating system users.
I am working with all browsers in windows 7, and although the design appears as it should in the firefox with MY operating system, my guesses to fix firefox/Linux have not worked.
My questions is what is proper margin to give to element div#endinglogo for it to appear where it should.
I have attached two images below.
The first shows how I want the header to look:
http://postimage.org/image/rsd27dvo/
The second shows how I been told it appears in browser firefox when using linux operating system:
http://postimage.org/image/rtgr3pqc/
I have a php file that serves firefoxLinux.css file, or at least that is the intent. Is this file being loaded when you see this website through firefox/linux?
Thank you for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的
firefox.css
中,您的div#endinglogo
有一个不同的负上边距。将其设置为-110px
(就像在chrome.css
文件中一样),它应该可以工作。不过,在相关的旁注中,为什么要为不同的浏览器创建多个样式表?对于大多数事情,都有跨浏览器和操作系统一致工作的解决方案,只有在少数情况下您才需要特殊样式(即对于 IE,可能是某些旧版本的 Firefox)。我认为如果你能够巩固你的风格,你会遇到更少的问题。当然这只是我的两分钱。
In your
firefox.css
, you have a different negative top margin for yourdiv#endinglogo
. Make it-110px
(like it is in yourchrome.css
file) and it should work.On a related sidenote though, why are you creating multiple stylesheets for different browsers? For most things there are solutions that work consistently across browsers and operating systems, and only in a few cases do you need special styles (i.e. for IE, maybe some older versions of firefox). I think if you were to consolidate your styles you would run into less problems. Of course that's just my two cents.