谁能解释一下为什么我的元素在旧版浏览器中定位不正确?
只是我对 XHTML、CSS 或 Javascript 还不够了解,我正在努力学习。我知道该怎么做才能让事情正常运转或看起来像我想要的那样,但我猜我的方法并不是获得我想要的结果的标准最佳方法;显然不是,因为它不能在所有浏览器上运行。
我希望有人愿意花一点时间和我一起检查代码,提出建议并解释为什么我所拥有的不是标准的编码。我有一些验证错误,但它们大多都在 javascript 中,我什至没有编写这些错误,所以老实说,我不知道它们是否造成了麻烦,也不知道它们是否造成了麻烦,也不知道如何修复它们。
所以我的网站非常简单。我只是想要一个专业的页面,潜在的雇主可以在其中看到我的简历和联系信息。当我在 Firefox 4 或 Safari 5.0.5 中查看我的网站时,一切都很完美。我的名字图像和“联系人”选项卡图像都与主容器 div 的边缘对齐。此外,带有箭头图片的文本向右排列约 50 像素,因此箭头不会与我的简历图片重叠。我使用绝对定位,因为当我尝试使用其他任何东西时,一切都会变得混乱。
我遇到的问题:当我在 IE8 和 Firefox 中查看我的网站时,我的姓名徽标、联系人图像选项卡和“请沉迷于...”箭头图片似乎向左偏离约 65 像素3.
我的网站是: nicholasdexter.me
再次抱歉,这个问题是针对我的,但我知道你们都是专家,我不知道还能去哪里寻求帮助。感谢您的阅读!
这是我的样式表: http://nicholasdexter.me/style.css
It's just that I don't really know enough about XHTML, CSS, or Javascript and I'm trying to learn. I know what to do in order to get things to work or look the way I want them to but I'm guessing my methods are not the standard best way to get the results I desire; obviously not because it's not working across all browsers.
I am hoping for someone who is willing to spend a little bit of time with me to go over the code, make recommendations and explain why what I have is not standard for coding. I have some validation errors but they mostly are all in the javascript, which I didn't even write so I honestly have no idea if they are causing trouble or how to fix them if they are.
So my website is pretty simple. I just want to have a professional page where potential employers can see my resume and contact information. When I look at my website in firefox 4 or Safari 5.0.5 everything is perfect. The image of my name and the "contact" tab images both line up with the edge of the main container div. Also the text with the arrow picture line up about 50 pixels to the right so the arrow does not overlap with my resume picture. I use absolute positioning because when I try to use anything else, it gets all messy.
The Problem I am Having: My name logo, contact image tab and "please indulge with..." arrow picture seem to be about 65 pixels off to the left when I view my website in IE8 and Firefox 3.
My website is: nicholasdexter.me
Once again, I'm sorry that this question is geared towards me but I know you all are experts and I don't know where else to go for help. Thank you for reading!
Here is my style sheet: http://nicholasdexter.me/style.css
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
旧版浏览器(特别是 Internet Explorer 6 和 7)中存在很多错误。此外,旧版浏览器不支持某些功能。
诀窍是:
- 使用称为“优雅降级/渐进增强”的技术,其中使用了较新的技术,但使用方式是否支持这些技术并不重要。例如,影子,如果没人能看到它们,谁在乎呢?如果他们这样做,那就太好了。诀窍是平衡这一点。
- 完全避免那些“新”技术。
这在这里不是什么新鲜事,甚至对专业人士来说也是一种痛苦。微软现在甚至讨厌IE6。 http://www.ie6countdown.com/ 所以不要为此自责。 :)
有很多资源可以帮助您找到问题的正确解决方案。这是一个:
哦,欢迎再次提问。前端开发(编码网页内容)有时是一个真正的挑战! :)
There's a lot of bugs in older browsers (particularly Internet Explorer 6 & 7). Also, some things just aren't supported in older browsers.
The trick is either to:
- Use something called Graceful Degradation/Progressive Enhancement, in which newer techniques are used, but are used in a way that it won't matter if there's support or not for those things. For example, shadows, if no-one can see them, who cares? If they do, great. The trick is balancing that out.
- Avoid those "new" techniques altogether.
This is nothing new here, and is even a pain for professionals. Microsoft evens hates IE6 now. http://www.ie6countdown.com/ So don't beat yourself up for it. :)
There are alot of resources out there that may help you find the right solution(s) to your problems. Here's one:
Oh, and feel free to ask questions again. Front-End Development (coding web stuff) is a real challenge some days! :)