<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>kglife developer&#039;s blog &#187; ie</title>
	<atom:link href="http://blog.kglife.com/tag/ie/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.kglife.com</link>
	<description>our web,our life</description>
	<lastBuildDate>Sat, 28 Nov 2009 16:37:17 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>浏览器Firefox与IE在CSS样式表中的差异</title>
		<link>http://blog.kglife.com/11_101.html</link>
		<comments>http://blog.kglife.com/11_101.html#comments</comments>
		<pubDate>Fri, 20 Nov 2009 04:24:13 +0000</pubDate>
		<dc:creator>mydozero</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[差异]]></category>
		<category><![CDATA[样式]]></category>

		<guid isPermaLink="false">http://blog.kglife.com/?p=101</guid>
		<description><![CDATA[1 针对firefox ie6 ie7的css样式
现在大部分都是用!important来hack，对于ie6和firefox测试可以正常显示，但是ie7对!important可以正确解释，会导致页面没按要求显示！找到一个针对IE7不错的hack方式就是使用“* html”，现在用IE7浏览一下，应该没有问题了。
现在写一个CSS可以这样：
#1 { color: #333; } /* Moz */
* html #1 { color: #666; } /* IE6 */
* html #1 { color: #999; } /* IE7 */
那么在firefox下字体颜色显示为#333，IE6下字体颜色显示为#666，IE7下字体颜色显示为#999。
2 css布局中的居中问题
主要的样式定义如下：

body {TEXT-ALIGN: center;}
#center { MARGIN-RIGHT: auto; MARGIN-LEFT: auto; }
说明：
首先在父级元素定义TEXT-ALIGN: center;这个的意思就是在父级元素内的内容居中；对于IE这样设定就已经可以了。
但在mozilla中不能居中。解决办法就是在子元素定义时候设定时再加上“MARGIN-RIGHT: auto;MARGIN-LEFT: auto; ”
需要说明的是，如果你想用这个方法使整个页面要居中，建议不要套在一个DIV里，你可以依次拆出多个div，只要在每个拆出的div里定义MARGIN-RIGHT: auto;MARGIN-LEFT: auto; 就可以了。
3&#160;&#160;盒模型不同解释.

#box{
&#160;&#160; width:600px;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;//for&#160;&#160; ie6.0-&#160;&#160; w\idth:500px;
&#160;&#160;&#160;&#160;&#160;&#160; //for&#160;&#160;ff ie6.0
}
#box{
&#160;&#160; width:600px!important
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;//for ff
&#160;&#160;&#160;&#160;width:600px;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;//for&#160;&#160;ff ie6.0
&#160;&#160;&#160;&#160;width /**/:500px;
&#160;&#160;&#160;&#160;&#160;&#160; [...]]]></description>
		<wfw:commentRss>http://blog.kglife.com/11_101.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
