网站在Firefox中看起来不错,但是需要调整IE 5&请帮忙! [英] Site looks fine in Firefox, but needs tweaking for IE 5 & 6. Please help!

查看:65
本文介绍了网站在Firefox中看起来不错,但是需要调整IE 5&请帮忙!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。这是我在这里的第一篇文章和我的第一个css网站。我读了很多以前的帖子,因此我确实验证了我的代码,但我找不到我的2个问题的答案:


1.当我定位导航时在绝对数据栏中,顶部和底部边框在IE 5& 6.因此,我将位置更改为相对位置,并且边框重新出现在IE中,但位置需要向上移动1/4英寸。


2.页脚中的文本以FF和Safari为中心,但它在IE6的框顶部对齐。


我非常感谢任何人提供的任何建议或帮助!我在这个地方拉我的头发!谢谢。


?????? HTML ????????????

[html]

<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

< html xmlns =" http://www.w3.org / 1999 / xhtml">

< head>

< meta http-equiv =" Content-Type"含量=" text / html的;字符集= ISO-8859-1" />

< title> Untitled Document< / title>

< link rel =" stylesheet"类型= QUOT;文本/ CSS" href =" styles.css" />


< / head>


< body>


< div id =" container">


< div id =" top">< img src =" images / logo_06 .JPG" alt =" nysamp logo" />< / div>


< div>

< ul id =" navlist">

< li id =" active">< a href ="#" id =" current"> Home< / a>< / li>

< li>< a href ="#">关于我们< / a>< / li>

< li>< a href ="#">联系我们< / a>< / li>

< li> < a href ="#">培训< / a>< / li>

< li>< a href ="#">资源< / a> ;< / li>

< / ul>

< / div>


< div id =" ; leftnav">

< ul>

< li>

< div align =" center">< a href ="#"> Straight Talk,< br />

公平解决方案< / a>< / div>

< / li>

< li>

< div align =" center">< / div>

< / li>

< li>

< div align =" center">< a href ="#">< br />

< br />

什么可以< br />

被调解?< / a>< / div>

< / li>

< li>

< div align =" center">< / div>

< / li>

< li>

< div align =" center">< a href ="#">< br />

< br />

成功案例< / a>< / div>

< / li>

< li>

< div align =" center">< / div>

< / li>

< li>

< div align =" center"> < a href ="#">< br />

< br />

何时收件人< br />

推荐我们< / a>< / div>

< / li>

< li>

< div align =" center">< / div>

< / li>

< li>< br />

< br />

< div align =" center">< a href ="#"> Find Your Local< br /> ;

调解中心< / a>< / div>

< / li>

< / ul>


< / div>


< div id =" content">

< h3>感谢您对纽约州农业调解计划(NYSAMP)的关注。 < / h3>

< p>农业调解是农民和农业社区其他人清楚沟通,有效谈判,找到公平可行的解决方案的工具。决策由直接参与的人做出,而不是由调解员或其他外部机构做出。 < / p>


< p> NYSAMP服务通常是免费的,而且总是负担得起,这要归功于我们资助者和争议的慷慨支持

分辨率社区。< / p>


< p>调解是保密和自愿的。研究表明,超过80%的调解导致达成协议; NYSAMP

中介的分辨率更高。 < / p>


< p> NYSAMP与附属调解办公室合作,为纽约的每个县提供服务。训练有素且经验丰富的NYSAMP调解员提供了解决各方之间问题的有效方法,并避免了因冲突或诉讼升级而导致的高额费用。 < / p>


< p> < img class =" imagefloat" SRC ="图像/ barn_sm.jpg" ALT ="谷仓"宽度= QUOT; 175"高度= QUOT; 135"边界=" 0" /> < / p>

< p> < img class =" imagefloat" SRC ="图像/ cherry_blossom_sm.jpg" alt =樱花宽度= QUOT; 203"高度= QUOT; 135"边界=" 0" /> < / p>


< p> NYSAMP工作人员可以就可能受益于调解的特定情况进行咨询,并提供

附加信息转介。< / p>

< p>除调解服务外,NYSAMP还提供沟通技巧,谈判,b $ b b冲突管理,调解和促进方面的培训机会。 < / p>


< / div>


< div>

< br / >

< / div>


< div id =" footer">


< p> 255 River Street& nbsp;& nbsp;:& nbsp;& nbsp;& nbsp;& nbsp; T roy,New York& nbsp; 12180

& nbsp;& nbsp;& nbsp;& nbsp;:& nbsp;& nbsp;& nbsp;& nbsp; P hone。 518.687.2246& nbsp;& nbsp;& nbsp;& nbsp;:

& nbsp;& nbsp;& nbsp; Toll Free。 866.669.7267&安培; NBSP;&安培; NBSP;&安培; NBSP;&安培; NBSP;:&安培; NBSP;&安培; NBSP;&安培; NBSP;&安培; NBSP;传真。 518.687.2245

< / p>

< / div>


< / div>

< / body>

< / html>

[/ html]

???????? CSS ?????????????

Hi. This is my first post here and my first css site. I read alot of the previous posts and therefore I did validate my code, but I couldn''t find the answers to my 2 problems which are:

1. When I position the nav bar absolute, the top and bottom borders disappear in IE 5 & 6. So, I changed the position to relative and the borders reappear in IE, but the position needs to be moved up like 1/4 inch.

2. The text in the footer is centered in FF and Safari, but it is aligned at the top of the box in IE6.

I would greatly appreciate any advice or help that anyone can offer! I''m pulling my hair out over this site! Thanks.

??????HTML?????????????
[html]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="styles.css"/>

</head>

<body>

<div id="container">

<div id="top"><img src="images/logo_06.jpg" alt="nysamp logo"/></div>

<div>
<ul id="navlist">
<li id="active"><a href="#" id="current">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#">Training</a></li>
<li><a href="#">Resources</a></li>
</ul>
</div>

<div id="leftnav">
<ul>
<li>
<div align="center"><a href="#">Straight Talk,<br />
Fair Solutions</a></div>
</li>
<li>
<div align="center"></div>
</li>
<li>
<div align="center"><a href="#"><br />
<br />
What Can <br />
Be Mediated?</a></div>
</li>
<li>
<div align="center"></div>
</li>
<li>
<div align="center"><a href="#"><br />
<br />
Success Stories</a></div>
</li>
<li>
<div align="center"></div>
</li>
<li>
<div align="center"><a href="#"><br />
<br />
When To <br />
Recommend Us</a></div>
</li>
<li>
<div align="center"></div>
</li>
<li><br />
<br />
<div align="center"><a href="#">Find Your Local <br />
Mediation Center</a></div>
</li>
</ul>

</div>

<div id="content">
<h3>Thank you for your interest in the New York State Agricultural Mediation Program (NYSAMP). </h3>
<p>Agricultural mediation is a tool for farmers and others in the agricultural community to communicate clearly, negotiate effectively, and to find fair and workable solutions. Decisions are made by the people directly involved, and not by
mediators or other outside authorities. </p>

<p>NYSAMP services are usually free and always affordable, thanks to the generous support of our funders and the dispute
resolution community.</p>

<p>Mediation is confidential and voluntary. Research shows that over 80% of mediation results in agreements; NYSAMP
mediations have an even higher resolution rate. </p>


<p>NYSAMP works with affiliated mediation offices to provide services for every county in New York. Trained and
experienced NYSAMP mediators provide a powerful way to solve problems between parties, and to avoid the high costs of
escalating conflict or litigation. </p>

<p> <img class="imagefloat" src="images/barn_sm.jpg" alt="barn" width="175" height="135" border="0"/> </p>
<p> <img class="imagefloat" src="images/cherry_blossom_sm.jpg" alt="cherry blossoms" width="203" height="135" border="0"/> </p>

<p>NYSAMP staff is available for consultation about specific situations that may benefit from mediation, and to provide
additional information about referrals.</p>
<p>In addition to mediation services, NYSAMP also provides training opportunities in communication skills, negotiation,
conflict management, mediation and facilitation. </p>

</div>

<div>
<br />
</div>

<div id="footer">

<p>255 River Street&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;T roy, New York&nbsp; 12180
&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;P hone. 518.687.2246&nbsp;&nbsp;&nbsp;&nbsp;:
&nbsp;&nbsp;&nbsp;Toll Free. 866.669.7267&nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;& nbsp;&nbsp;Fax. 518.687.2245
</p>
</div>

</div>
</body>
</html>
[/html]
????????CSS?????????????????

展开 | 选择 | Wrap | 行号

推荐答案

尝试使用负边距或摆弄线高。我发现这些都是常规罪魁祸首。


您应该了解doctype - 浏览器的行为会根据您的选择而有所不同。你有过渡 - 我认为这意味着IE的怪癖模式 - 这可能是你想要的,但这是一个因素。


http://www.google.com/search? hl = en& q = ie + quirks + mode + doctype& btnG = Search


然后我会使用特定的IE样式表


ie styles_ie.css


包括仅当IE是您的浏览器并且具有特殊样式来修复这些小错误或呈现略有不同的页面时。通常你不需要太多额外的样式来修复那些小错误。


或者使用条件评论


http:// www .google.com / search?hl = en& q =有条件+评论& btnG = Google + Se arch


或使用CSS表达式


http://www.google.com/search?hl=zh-CN&q=ie+css+expressions&btnG=Google+Sear ch


或使用CSS hacks


http://www.google.com/search?hl=en&q=css+hacks&btnG=Google+Search
Try negative margins or fiddling with line-height. I find those are regular culprits.

You should be aware of the doctype - the browsers behave differently depending on your choice. You have Transitional - I believe that means quirks mode for IE - that might be what you want but it''s a factor.

http://www.google.com/search?hl=en&q=ie+quirks+mode+doctype&btnG=Search

Then I would either use a specific IE stylesheet

ie styles_ie.css

Include that only when IE is your browser and have special styles to fix those little errors or present a slightly different page. Normally you don''t need too many extra styles to fix those little errors.

Or use conditional comments

http://www.google.com/search?hl=en&q=conditional+comments&btnG=Google+Se arch

Or use CSS expressions

http://www.google.com/search?hl=en&q=ie+css+expressions&btnG=Google+Sear ch

Or use CSS hacks

http://www.google.com/search?hl=en&q=css+hacks&btnG=Google+Search


看看是否只是添加* {margin:0}修复此问题。 IE喜欢在没有边距的情况下添加边距。这是否会使其他事情复杂化,我们将不得不看到。


Transitional不会让IE陷入困境。只有不正确的doctype,或者在doctype之前放置了什么。
See if just adding *{margin:0} fixes this for IE. IE likes to add margin where there is none. Whether this complicates other things, we''ll have to see.

Transitional will not put IE into quirks. Only an incorrect doctype will, or if anything is placed before the doctype.


"然后我要么使用特定的IE样式表,即styles_ie.css


包括仅当IE是您的浏览器并且具有特殊样式来修复这些小错误或呈现略微不同的页面时。通常你不需要太多额外的样式来修复那些小错误。

???????????????????????? ??????????????????????????? ??????????????????? b b b b b b b b b b b b b

这很有道理,但我不明白如何应用ie样式表。是否有特定的代码,以便浏览器知道选择哪个样式表?

(对不起,如果术语不正确!)
"Then I would either use a specific IE stylesheet ie styles_ie.css

Include that only when IE is your browser and have special styles to fix those little errors or present a slightly different page. Normally you don''t need too many extra styles to fix those little errors."
?????????????????????????????????????????????????? ????????????????????

Thank you for your quick response!
That makes perfect sense, but I dont understand how to apply the ie style sheet. Is there a specific code, so that the browser knows which style sheet to choose?
(sorry if the terminology is not correct!)


这篇关于网站在Firefox中看起来不错,但是需要调整IE 5&amp;请帮忙!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆