<?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/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>8bitodyssey.com &#187; ie7</title>
	<atom:link href="http://8bitodyssey.com/archives/tag/ie7/feed" rel="self" type="application/rss+xml" />
	<link>http://8bitodyssey.com</link>
	<description>WordPressでつづる、おでのこの道わが旅。</description>
	<lastBuildDate>Sat, 04 Feb 2012 02:26:13 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://8bitodyssey.com/archives/tag/ie7/feed" />
		<item>
		<title>IE7CSS問題のまとめと対策</title>
		<link>http://8bitodyssey.com/archives/651</link>
		<comments>http://8bitodyssey.com/archives/651#comments</comments>
		<pubDate>Tue, 23 May 2006 14:59:36 +0000</pubDate>
		<dc:creator>おで</dc:creator>
				<category><![CDATA[ウェブ開発]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[ie7]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://8bitodyssey.com/archives/651</guid>
		<description><![CDATA[<p><img src="http://www.odysseygate.com/images/pero.jpg" style="float: left; margin: 2px 5px 1px 0px"/></p>
<p>はてなブックマークで知ったんですが、Internet Explorer7のCSS問題がまた注目を浴びてるんですね。<br />
<a href="http://b.hatena.ne.jp/hotentry?mode=daily&date=20060523" target="_blank" title="はてなブックマーク &raquo; 過去の人気エントリー 2006年05月23日">はてなブックマーク &raquo; 過去の人気エントリー 2006年05月23日</a><br />
<a href="http://arena.nikkeibp.co.jp/col/20060516/116681/" target="_blank" title="Internet Explorer 7ベータ2の不具合からWebデザイン業界の混乱が見えてきた">Internet Explorer 7ベータ2の不具合からWebデザイン業界の混乱が見えてきた</a></p>
<p>このブログでも以前に、<a href="http://8bitodyssey.com/archives/603" title="Internet Explorer 7で使えなくなるCSSハック">Internet Explorer 7で使えなくなるCSSハック</a>でIE7のCSS実装について取り上げましたが、頭の整理のためIE7を取り巻くCSS問題と処方箋についてまとめてみました。</p>
<p style="margin-top: 2em;"><h3>原因</h3>
Internet Explorer6：CSS実装にバグあり＋未対応多数。Quirks modeとか。<br />
Modern Blowser（FireFoxとかSafariとか）：標準的なCSS実装。Standard mode。
→ウェブ製作者：IEだけが解釈するようにCSSハック導入</p>
<p>↓<br />
MS：IE7は標準的なCSSを実装するよ＋ハックは効かなくなるよ(´∀`)</p>
<p>↓<br />
IEハックを放置すると→IE7で見ると表示大崩壊ヽ(;´Д`)ノ<br />
IEハックを削除すると→IE6以前で表示大崩壊ヽ(´Д`;)ノ</p>
<p><h3>処方箋（対策）</h3>
<ol>
<li>IE7なんて消えて無くなれ派→ハックそのまま</li>
<li>IE6以前切捨て派→ハック削除。さっさとインストールしろ</li>
<li>八方美人→IE7でもIE6でもモダンブラウザでも問題ないように書き換える。<br />
    <ul>
        <li>条件付コメント（Conditional Commentsを使う）*1</li>
        <li>IE7ハックを使う*2。但しIE8以降に問題を先延ばしするだけ。</li>
       <li>デザインの制約があっても我慢我慢。</li>
    </ul>
</li>
</ol></p>
<p><h3>*1 条件付コメント（Conditional Comments）を使う</h3>
head内に、<br />
<code style="color: #5dbf2e;font-weight: bold;">&lt;!--[if lt IE 7]&gt;
&lt;style&gt;
...（CSS）...
&lt;/style&gt;
&lt;![endif]--&gt;</code><br />
とすることでIE7未満のブラウザだけが読み込むCSSを設定できる…らしい。IE7正式版が出たら試してみよう…。<br />
参考：<a href="http://www.keynavi.net/ja/bugh/comments.html" target="_blank" title="条件付コメント(Conditional Comments)実験ページ">条件付コメント(Conditional Comments)実験ページ</a></p>
<p><ins datetime="2007-03-15T15:38:10+00:00">2007-03-15追記：条件付コメントはMicrosoft IEチームも積極的には推奨していない手法であることが分かりました。くわしくは<a href="http://8bitodyssey.com/archives/768" title="IE7対策:条件付コメントは使ってはいけない">IE7対策:条件付コメントは使ってはいけない</a>を参照してください。</ins></p>
<p><h3>*2 IE7ハックを使う</h3>
以下のハックを使うことで、特定のバージョンに対してCSSを適用できる。…が将来困るかも。</p>
<blockquote cite="http://nanobox.chipx86.com/blog/2006/04/easy-css-hacks-for-ie7.php" title="Easy CSS hacks for IE7 - Nano See, Nano Do">
参考：<a href="http://nanobox.chipx86.com/blog/2006/04/easy-css-hacks-for-ie7.php" target="_blank" title="Easy CSS hacks for IE7 - Nano See, Nano Do">Easy CSS hacks for IE7 - Nano See, Nano Do</a><br />
IE 6以下<br />
<code style="color: #5dbf2e;font-weight: bold;">* html {}</code><br />
IE 7以下<br />
<code style="color: #5dbf2e;font-weight: bold;">*+html, * html {} </code><br />
IE 7のみ<br />
<code style="color: #5dbf2e;font-weight: bold;">*+html {}</code><br />
IE 7とモダンブラウザのみ<br />
<code style="color: #5dbf2e;font-weight: bold;">html>body {}</code><br />
IE7以外のモダンブラウザのみ<br />
<code style="color: #5dbf2e;font-weight: bold;">html>/**/body </code></blockquote>
<p>Nano See,Nano Doさんのサイトでも書いてあるように、モダンブラウザ向けCSS＋条件付コメントでIE6未満向けCSSを記述…がいまのところベストなのかも。<br />
<span style="font-size: 0.8em;">MSがWindows UpdateとかでせめてIE6のCSSを直してくれれば済む話なのに…ぶつぶつ</span></p><p>&copy; 2012 <a href="http://www.odysseygate.com/" title="Odysseygate.com">Odysseygate.com</a> This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact odysseygate@gmail.com so we can take legal action immediately.</p><p>鼻からカフェモカ。</p>]]></description>
		<wfw:commentRss>http://8bitodyssey.com/archives/651/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://8bitodyssey.com/archives/651" />
	</item>
	</channel>
</rss>

