<?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>We were born in 1967. &#187; XHTML+CSS</title>
	<atom:link href="http://www.haru3-67.com/web/xhtml-css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.haru3-67.com</link>
	<description>1967年式 Volkswagen Type-1 に乗る、1967年生まれのおやじの blog です。</description>
	<lastBuildDate>Sun, 09 Oct 2011 01:46:57 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>CSS Naked Day</title>
		<link>http://www.haru3-67.com/2009/04/198.html</link>
		<comments>http://www.haru3-67.com/2009/04/198.html#comments</comments>
		<pubDate>Thu, 09 Apr 2009 04:16:39 +0000</pubDate>
		<dc:creator>haru3</dc:creator>
				<category><![CDATA[XHTML+CSS]]></category>

		<guid isPermaLink="false">http://www.haru3-67.com/2009/04/09/198.html</guid>
		<description><![CDATA[今日、4月9日は &#8220;CSS Naked Day&#8221; です。Webページから CSS（見た目）を外して  (X)HTML（構造）を見直そうという日。
このブログもニューヨーク時間の9日午前０時（日本時 [...]]]></description>
			<content:encoded><![CDATA[<p>今日、4月9日は &#8220;<a href="http://naked.dustindiaz.com/">CSS Naked Day</a>&#8221; です。Webページから <abbr title="Cascading Style Sheets">CSS</abbr>（見た目）を外して  <abbr title="(Extensible) HyperText Markup Language">(X)HTML</abbr>（構造）を見直そうという日。</p>
<p>このブログもニューヨーク時間の9日午前０時（日本時間の午後1時）から <abbr title="Cascading Style Sheets">CSS</abbr> を外しています。</p>
<p><ins>CSS Naked Day 終わったのですが元に戻すことを忘れてました。11日午後1時、元に戻しました。</ins></p>
]]></content:encoded>
			<wfw:commentRss>http://www.haru3-67.com/2009/04/198.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE7のズーム機能による問題の解決策</title>
		<link>http://www.haru3-67.com/2008/02/106.html</link>
		<comments>http://www.haru3-67.com/2008/02/106.html#comments</comments>
		<pubDate>Wed, 13 Feb 2008 22:54:00 +0000</pubDate>
		<dc:creator>haru3</dc:creator>
				<category><![CDATA[XHTML+CSS]]></category>

		<guid isPermaLink="false">http://www.haru3-67.com/2008/02/14/106.html</guid>
		<description><![CDATA[以前書いた IE7のズーム機能の問題の解決策がわかりました。
まず、position プロパティを使ってレイアウトした場合に、拡大/縮小すると要素同士の間隔が広がっていったり、縮まって重なり合ったりする問題。
これは p [...]]]></description>
			<content:encoded><![CDATA[<p>以前書いた <a href="http://www.haru3-67.com/2008/01/99.html"><abbr title="Internet Explorer 7">IE7</abbr>のズーム機能の問題</a>の解決策がわかりました。</p>
<p>まず、position プロパティを使ってレイアウトした場合に、拡大/縮小すると要素同士の間隔が広がっていったり、縮まって重なり合ったりする問題。</p>
<p>これは position:relative を指定した要素同士を包括する要素（例えば body）にも position:relative を指定してやることで解決します。</p>
<p>そして、 body の背景に画像を配置した場合に背景画像が拡大/縮小されない問題。</p>
<p>これは背景画像を body 以外に指定してやればいいわけで、&lt;body&gt; の内側に例えば &lt;div id=&quot;body-inner&quot;&gt; といった要素を追加し、この #body-inner に背景画像を指定すれば解決します。</p>
<p>もうひとつ、前回書かなかったのですが、float あるいは display:inline を設定して li 要素などを横に並べた場合、それに設定している背景画像やボーダーがズームによってずれます。</p>
<p>これはその要素に zoom:1 を指定してやればOKですが、zoom プロパティは <abbr title="Internet Explorer">IE</abbr> の独自仕様なので <abbr title="World Wide Web Consortium">W3C</abbr> の Validation に引っかかります。なので、<abbr title="Internet Explorer">IE</abbr>専用の <abbr title="Cascading Style Sheets">CSS</abbr> に書いて <abbr title="Internet Explorer">IE</abbr> の条件付きコメントで <abbr title="HyperText Markup Language">HTML</abbr> に読み込ませるなどの工夫が必要です。</p>
<p>＃このサイトは見直したいところが沢山あるので、まだ直していません。w</p>
]]></content:encoded>
			<wfw:commentRss>http://www.haru3-67.com/2008/02/106.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE7のズーム機能の問題</title>
		<link>http://www.haru3-67.com/2008/01/99.html</link>
		<comments>http://www.haru3-67.com/2008/01/99.html#comments</comments>
		<pubDate>Mon, 14 Jan 2008 04:35:13 +0000</pubDate>
		<dc:creator>haru3</dc:creator>
				<category><![CDATA[XHTML+CSS]]></category>

		<guid isPermaLink="false">http://www.haru3-67.com/2008/01/14/99.html</guid>
		<description><![CDATA[2月13日から Windows Update による“強制配布”が始まる Internet Explorer 7。公開から1年以上。諸外国ではとっくに配布されていますが、やっと日本でも強制配布が始まるわけです。
さてその [...]]]></description>
			<content:encoded><![CDATA[<p>2月13日から Windows Update による“強制配布”が始まる Internet Explorer 7。公開から1年以上。諸外国ではとっくに配布されていますが、やっと日本でも強制配布が始まるわけです。</p>
<p>さてその <abbr title="Internet Explorer 7">IE7</abbr>。他のブラウザではとっくに実装されていたタブブラウズや縮小印刷などの機能がようやく実装され、Ver.6 までのチープな <abbr title="Cascading Style Sheets">CSS</abbr> の対応や表示の問題が様々改善されてはいるものの、他のブラウザに比べるとやはり問題だらけです。</p>
<p>とりわけ厄介なのがズーム機能。これまでのフォントの拡大/縮小に加え、画像等を含めて画面全体が拡大/縮小されるようになった（Ctrl + ホイールの操作はこっちが優先）わけで、ユーザビリティ的には有効な機能なのですが、<abbr title="Cascading Style Sheets">CSS</abbr> の表示が中途半端で、拡大/縮小を行うと表示にズレが発生する場合があります。</p>
<p><span id="more-99"></span>一つは position プロパティを使ってレイアウトした場合。拡大/縮小すると要素同士の間隔が広がっていったり、縮まって重なり合ったりします。</p>
<p>もう一つは body の背景に画像を配置した場合。困ったことに body の背景は拡大/縮小されません。<br />
私のこのサイトは、横幅 800ピクセルで表示したときに、コンテンツが横スクロールが発生することなくできるだけギリギリ一杯に表示されるように、左右の区切りと中央のカラムの背景はまとめて body の背景画像として表示しています。だからこのサイトを <abbr title="Internet Explorer 7">IE7</abbr> で拡大/縮小してみるととんでもないことになってしまいます。<br />
下は 120% に拡大したときと、80% に縮小したときの表示です。</p>
<p><a href="http://www.haru3-67.com/wp/wp-content/uploads/2008/01/ie7_120.gif" rel="lightbox[99]"><img src="http://www.haru3-67.com/wp/wp-content/uploads/2008/01/ie7_120-thumb.gif" width="150" height="113" alt="IE7で120%の表示" class="alignnone" /></a><a href="http://www.haru3-67.com/wp/wp-content/uploads/2008/01/ie7_80.gif" rel="lightbox[99]"><img src="http://www.haru3-67.com/wp/wp-content/uploads/2008/01/ie7_80-thumb.gif" width="150" height="113" alt="IE7で80%の表示" class="alignnone" /></a></p>
<p>なお、<a href="http://jp.opera.com/">Opera</a> は以前からズーム機能があるわけですが、こっちは問題なく body に指定した背景も拡大/縮小してくれます。さすが、というか、それが当たり前。</p>
<p>ちなみに私は <a href="http://www.mozilla-japan.org/products/firefox/">Firefox</a> 派。みんな、<abbr title="Internet Explorer">IE</abbr> なんか捨てて、<script type="text/javascript">google_ad_client = "pub-4935634843204915";google_ad_slot = "2384918342";google_ad_output = "textlink";google_ad_format = "ref_text";google_cpa_choice = "";</script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>。</p>
<p><ins>2月14日追記　<a href="http://www.haru3-67.com/2008/02/106.html">解決策はこちら</a></ins></p>
]]></content:encoded>
			<wfw:commentRss>http://www.haru3-67.com/2008/01/99.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>テキストの両端揃え</title>
		<link>http://www.haru3-67.com/2007/11/74.html</link>
		<comments>http://www.haru3-67.com/2007/11/74.html#comments</comments>
		<pubDate>Sat, 03 Nov 2007 16:02:11 +0000</pubDate>
		<dc:creator>haru3</dc:creator>
				<category><![CDATA[XHTML+CSS]]></category>

		<guid isPermaLink="false">http://www.haru3-67.com/2007/11/04/74.html</guid>
		<description><![CDATA[今までWebサイト上ではテキストの両端揃えは出来ないと諦めていました。というより、Internet Explorer が存在するが為に諦めていたといべきでしょう。
Firefoxなど、Web標準に準拠したブラウザでは、t [...]]]></description>
			<content:encoded><![CDATA[<p>今までWebサイト上ではテキストの両端揃えは出来ないと諦めていました。というより、Internet Explorer が存在するが為に諦めていたといべきでしょう。<br />
<a href="http://mozilla.jp/firefox/">Firefox</a>など、Web標準に準拠したブラウザでは、text-align プロパティに“justify”の値を指定することで両端揃えにできますが、<abbr title="Internet Explorer">IE</abbr> は最新版の Ver.7 でさえも text-align:justify に対応していません。</p>
<p>でも、<abbr title="Internet Explorer">IE</abbr>でも両端揃えが、それも <a href="http://validator.w3.org/">W3C の Validator</a> をクリアして実現する方法を知り、最近仕事で制作するサイトはこれを使っています。このBlogも本文部分を両端揃えにしました。</p>
<p><span id="more-74"></span>それは、<abbr title="Internet Explorer">IE</abbr> の独自拡張である“text-justify: inter-ideograph;”を、<abbr title="Internet Explorer">IE</abbr> の独自タグである条件付きコメントで読み込む方法です。</p>
<p>“text-justify: inter-ideograph;”は、<abbr title="Internet Explorer">IE</abbr> で両端揃えを実現できますが、W3C の仕様に無いため、構文エラーとなります。<br />
そこで、これを <abbr title="Internet Explorer">IE</abbr> 専用の <abbr title="Cascading Style Sheets">CSS</abbr> ファイルにして、条件付きコメントで <abbr title="Extensible HyperText Markup Language">XHTML</abbr> に読み込みます。</p>
<p>つまり、正規の <abbr title="Cascading Style Sheets">CSS</abbr> には“text-align:justify”を記述し、<abbr title="Internet Explorer">IE</abbr> 専用の <abbr title="Cascading Style Sheets">CSS</abbr> に“text-justify: inter-ideograph;”を記述して、これを <abbr title="Extensible HyperText Markup Language">XHTML</abbr> の &lt;head&gt; 内に、</p>
<pre><code>&lt;!--[if IE]&gt;
&lt;link rel=&quot;stylesheet&quot; href=&quot;<$MTBlogRelativeURL$>css/ie_win.css&quot; type=&quot;text/css&quot; /&gt;
&lt;![endif]--&gt;</code></pre>
<p>という具合に記述して読み込むわけです。<br />
これで、<abbr title="Internet Explorer">IE</abbr> 以外には“text-align:justify”の指定によって、<abbr title="Internet Explorer">IE</abbr> は“text-justify: inter-ideograph;”の指定によって両端揃えとなります。<br />
その上、<abbr title="Extensible HyperText Markup Language">XHTML</abbr> に記述した条件付きコメントは、<abbr title="Internet Explorer">IE</abbr> 以外には単なるコメントとして扱われるため、W3C の Validator もクリアできるわけです。</p>
<p>連続する半角英数を折り返す“word-break: break-all;”も同様で、これについては以前から同様の方法で実現していました。</p>
<p>一方、最近ではこれら <abbr title="Internet Explorer">IE</abbr> が対応していない <abbr title="Cascading Style Sheets">CSS</abbr> プロパティや値を補うための JavaScript もいろいろ公開されているみたいですね。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.haru3-67.com/2007/11/74.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>外部リンクに対してアイコンを表示する</title>
		<link>http://www.haru3-67.com/2007/04/22.html</link>
		<comments>http://www.haru3-67.com/2007/04/22.html#comments</comments>
		<pubDate>Sat, 28 Apr 2007 05:29:33 +0000</pubDate>
		<dc:creator>haru3</dc:creator>
				<category><![CDATA[XHTML+CSS]]></category>

		<guid isPermaLink="false">http://www.haru3-67.com/2007/04/28/22.html</guid>
		<description><![CDATA[本文内の外部リンクに対して、それを示すアイコンを表示する方法として、Web標準の教科書―XHTMLとCSSでつくる“正しい”Webサイトに、a要素に「.external」といった class を付け、

アイコン画像を  [...]]]></description>
			<content:encoded><![CDATA[<p>本文内の外部リンクに対して、それを示すアイコンを表示する方法として、<a href="http://www.amazon.co.jp/gp/product/4798010928?ie=UTF8&amp;tag=haru3-22&amp;linkCode=as2&amp;camp=247&amp;creative=1211&amp;creativeASIN=4798010928">Web標準の教科書―XHTMLとCSSでつくる“正しい”Webサイト</a>に、a要素に「.external」といった class を付け、</p>
<ul>
<li>アイコン画像を a要素の背景として右端にひとつ表示する方法</li>
<li>:after擬似要素と contentプロパティを使ってアイコン画像を追加する方法</li>
</ul>
<p>と、2種類の方法が載っています。</p>
<blockquote><p>
ただし、Win <abbr title="Internet Explorer">IE</abbr> と Mac <abbr title="Internet Explorer">IE</abbr> はいずれのバージョンも :after擬似要素と contentプロパティをサポートしていないため、背景関連プロパティを利用して実現したほうがよいだろう。
</p></blockquote>
<p>このように書かれているのですが、<abbr title="Internet Explorer">IE</abbr> ではリンクテキストが折り返している場合、リンクテキストが含まれる行の右端に表示されてしまい、返ってみにくい状態となってしまいます。</p>
<p>また、いちいち外部リンクの a要素に対して class 指定するのも面倒ですし、漏れがあるかもしれません。</p>
<p><span id="more-22"></span>で、このサイトに採用した方法は、属性セレクタを使ってリンク先を判別し、:after擬似要素と contentプロパティを使ってアイコン画像を追加する方法です。したがって、<abbr title="Internet Explorer">IE</abbr> では表示できません。<br />
＃みなさん、poor な <abbr title="Internet Explorer">IE</abbr> より、<a href="http://www.mozilla-japan.org/products/firefox/">Firefox</a> を使いましょう。</p>
<p>因みに、<abbr title="Internet Explorer 7">IE7</abbr> では属性セレクタには対応するようになりましたが、相変わらず :after擬似要素あるいは :before擬似要素には未対応です。</p>
<p>具体的には、</p>
<pre><code>div#main a[href^="http:"]:after,
div#main a[href^="https:"]:after {
	content: url(css_img/external.gif);
	vertical-align: middle;
}
div#main a[href^="&lt;$MTBlogUrl$&gt;"]:after {
	content: "";
	vertical-align: baseline;
}</code></pre>
<p>href属性が&#8221;http:&#8221;か&#8221;https:&#8221;で始まる a要素に対して、リンクテキストの後にアイコン画像を追加し、その上で href属性が自サイトの <abbr title="Uniform Resource Locator">URL</abbr> である場合は追加したアイコン画像を消します。</p>
<p>なお、div#main を指定してコンテンツ領域のみに限定しています。</p>
<p>参考にしたサイト： <a href="http://cfdn.blog1.fc2.com/blog-entry-31.html">CFDN | 外部リンクにアイコンを付ける</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.haru3-67.com/2007/04/22.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

