<?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>イテルの一日一問 &#187; css</title>
	<atom:link href="http://oneday.ter.jp/tag/css/feed" rel="self" type="application/rss+xml" />
	<link>http://oneday.ter.jp</link>
	<description>一日にひとつは何かを考える。</description>
	<lastBuildDate>Mon, 31 Jan 2011 09:23:33 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/tag/css/feed" />
		<item>
		<title>cakephpでcssや画像の指定</title>
		<link>http://oneday.ter.jp/php/cakephp-php/809.html</link>
		<comments>http://oneday.ter.jp/php/cakephp-php/809.html#comments</comments>
		<pubDate>Wed, 02 Dec 2009 01:13:08 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[テンプレート]]></category>
		<category><![CDATA[レイアウト]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=809</guid>
		<description><![CDATA[いろんなブログやマニュアルなどに掲載されているかもしれないが自分のメモ用として記載しておきます。 CSSの指定 webrootのcssフォルダ内の「hoge.css」を読み込みます。 画像の指定 webrootのimgフ [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://oneday.ter.jp/wp-content/uploads/2009/12/cake2-700x200.jpg" alt="cake" title="cake" width="700" height="200" class="alignnone size-thumbnail wp-image-829" /></p>
<p>いろんなブログやマニュアルなどに掲載されているかもしれないが自分のメモ用として記載しておきます。</p>
<h3>CSSの指定</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php echo $html-&gt;css('hoge'); ?&gt;
</pre>
<p>webrootのcssフォルダ内の「hoge.css」を読み込みます。</p>
<h3>画像の指定</h3>
<pre class="brush: php; title: ; notranslate">
&lt;?php echo $html-&gt;image(&quot;hoge.png&quot;) ?&gt;
</pre>
<p>webrootのimgフォルダ内の「hoge.png」を読み込みます。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/php/cakephp-php/809.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/php/cakephp-php/809.html" />
	</item>
		<item>
		<title>マウスオーバー時に透明度を変更する（css）</title>
		<link>http://oneday.ter.jp/css-xhtml/747.html</link>
		<comments>http://oneday.ter.jp/css-xhtml/747.html#comments</comments>
		<pubDate>Sat, 22 Aug 2009 11:48:21 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[css＋xhtmlなど]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[フィルター]]></category>
		<category><![CDATA[透明度]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=747</guid>
		<description><![CDATA[これまた、時間がないときに覚えておきたい方法。 とIE8対策っぽいのも書きましたが、なぜかうまく認識せず。 もうちょい調査が必要なようです。]]></description>
			<content:encoded><![CDATA[<p><img src="http://oneday.ter.jp/wp-content/uploads/2009/08/0908211-700x200.jpg" alt="090821" title="090821" width="700" height="200" class="alignnone size-thumbnail wp-image-750" /></p>
<p>これまた、時間がないときに覚えておきたい方法。</p>
<pre class="brush: css; title: ; notranslate">
#hoge a:hover{
	border:5px solid #996600;/* border */
	opacity:0.8;
	filter:alpha(opacity=80);/*ie6 7*/
	zoom:1.0;/*ie6 7*/
	-ms-filter:&quot;alpha(opacity=80)&quot;;/*ie8*/
	}
</pre>
<p>とIE8対策っぽいのも書きましたが、なぜかうまく認識せず。<br />
もうちょい調査が必要なようです。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/css-xhtml/747.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/css-xhtml/747.html" />
	</item>
		<item>
		<title>マウスオーバーで画像にラインをつけるcss</title>
		<link>http://oneday.ter.jp/css-xhtml/737.html</link>
		<comments>http://oneday.ter.jp/css-xhtml/737.html#comments</comments>
		<pubDate>Fri, 21 Aug 2009 10:30:47 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[css＋xhtmlなど]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[ホバー]]></category>
		<category><![CDATA[マウスオーバー]]></category>
		<category><![CDATA[画像にライン]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=737</guid>
		<description><![CDATA[時間がない、面倒くさい場合に使いたい、CSSで マウスオーバーした時に画像のフチにラインをつける方法。 これだけ。 floatなどを使用するので若干調整が必要な場合もある。]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-739" title="090821" src="http://oneday.ter.jp/wp-content/uploads/2009/08/090821-700x200.jpg" alt="090821" width="700" height="200" /></p>
<p>時間がない、面倒くさい場合に使いたい、CSSで<br />
マウスオーバーした時に画像のフチにラインをつける方法。</p>
<pre class="brush: css; title: ; notranslate">
#fuchi-gazou a img,
#fuchi-gazou a{
    border: none;
    overflow: hidden;
    float: left;
}
#fuchi-gazou  a:hover{
    border: 5px solid #333333;
    }
#fuchi-gazou a:hover img{
    margin: -5px;
}
</pre>
<p>これだけ。<br />
floatなどを使用するので若干調整が必要な場合もある。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/css-xhtml/737.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/css-xhtml/737.html" />
	</item>
		<item>
		<title>設置したdivの背景をページ下まで伸ばす</title>
		<link>http://oneday.ter.jp/css-xhtml/722.html</link>
		<comments>http://oneday.ter.jp/css-xhtml/722.html#comments</comments>
		<pubDate>Wed, 19 Aug 2009 10:06:27 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[css＋xhtmlなど]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[ブラウザ]]></category>
		<category><![CDATA[下まで]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=722</guid>
		<description><![CDATA[良く使うのだが、div要素をブラウザの下の方まで伸ばす方法。 毎度、忘れてしまうのでメモっておく。 htmlの例 cssの例 と、これだけ。]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-735" title="090819" src="http://oneday.ter.jp/wp-content/uploads/2009/08/0908191-700x200.jpg" alt="090819" width="700" height="200" /></p>
<p>良く使うのだが、div要素をブラウザの下の方まで伸ばす方法。<br />
毎度、忘れてしまうのでメモっておく。</p>
<h3>htmlの例</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;body&gt;
    &lt;div id=&quot;layout&quot;&gt;ブラウザの下まで伸ばしたいよ&lt;/div&gt;
&lt;/body&gt;
</pre>
<h3>cssの例</h3>
<pre class="brush: css; title: ; notranslate">
html{
    height:100%;
}
body{
    height:100%;
}
#layout{
    height:100%;
    min-height:100%;
    width:80%;
    background:Khaki;
    border-right:1px solid red;
}
body &gt; #layout{
    height:auto;
}
</pre>
<p>と、これだけ。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/css-xhtml/722.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/css-xhtml/722.html" />
	</item>
		<item>
		<title>背景にFlashを置く</title>
		<link>http://oneday.ter.jp/flash/471.html</link>
		<comments>http://oneday.ter.jp/flash/471.html#comments</comments>
		<pubDate>Thu, 23 Jul 2009 04:36:35 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[css＋xhtmlなど]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[背景にFlash設置]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=471</guid>
		<description><![CDATA[3日目の伊藤商店サイトを作った際のチップス。 FLASHを背景にしきたい場合、次のような感じにするといいみたい。 HTMLソース：Swfobjectを使用して配置 ※swfobjectについては過去の記事を参照してちょ。 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://oneday.ter.jp/wp-content/uploads/2009/07/090724-700x200.jpg" alt="090724" title="090724" width="700" height="200" class="alignnone size-thumbnail wp-image-496" /></p>
<p>3日目の<a href="http://ito.ter.jp" target="_blank">伊藤商店</a>サイトを作った際のチップス。<br />
FLASHを背景にしきたい場合、次のような感じにするといいみたい。</p>
<h3>HTMLソース：Swfobjectを使用して配置</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;content&quot;&gt;
&lt;h1&gt;伊藤商店&lt;/h1&gt;
&lt;p&gt;伊藤商店はステキなwebクリエイターです&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&quot;flash&quot;&gt;
&lt;div id=&quot;flashcontent&quot;&gt;
&lt;strong&gt;このサイトでは&lt;a href=&quot;http://www.adobe.com/jp/products/flashplayer/&quot; target=&quot;_blank&quot;&gt;Adobe Flash Player&lt;/a&gt;が必要です。&lt;/strong&gt;&lt;br /&gt;
Adobeのサイトより最新の&lt;a href=&quot;http://www.adobe.com/jp/products/flashplayer/&quot; target=&quot;_blank&quot;&gt;FlashPlayerをダウンロード&lt;/a&gt;してください。
&lt;/div&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
// &lt;![CDATA[
var so = new SWFObject(&quot;itoshoten.swf&quot;, &quot;sotester&quot;, &quot;100%&quot;, &quot;100%&quot;, &quot;10&quot;, &quot;#000000&quot;);
so.addVariable(&quot;flashVarText&quot;, &quot;this is passed in via FlashVars for example only&quot;);
so.addParam(&quot;wmode&quot;, &quot;transparent&quot;);
so.addParam(&quot;scale&quot;, &quot;noscale&quot;);
so.write(&quot;flashcontent&quot;);
// ]]&gt;
&lt;/script&gt;
&lt;/div&gt;
</pre>
<p>※swfobjectについては<a href="http://oneday.ter.jp/css-xhtml/265.html" target="_blank">過去の記事</a>を参照してちょ。</p>
<h3>CSSソース</h3>
<pre class="brush: css; title: ; notranslate">
#content {
	position: relative;
	z-index: 1;
}
#flash {
	position: absolute;
	z-index:0;
	top:0;
	left:0;
	width:100%;
	height:100%;
}
</pre>
<p>z-indexでレイヤーを指定して使う。<br />
古いブラウザによっては正常に見えない可能性もあるが、<br />
IE6より前のブラウザとかは、無視したいところ。。。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/flash/471.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/flash/471.html" />
	</item>
		<item>
		<title>cssで背景を固定配置にする</title>
		<link>http://oneday.ter.jp/css-xhtml/469.html</link>
		<comments>http://oneday.ter.jp/css-xhtml/469.html#comments</comments>
		<pubDate>Tue, 21 Jul 2009 04:35:55 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[css＋xhtmlなど]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[fixed]]></category>
		<category><![CDATA[固定配置]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=469</guid>
		<description><![CDATA[今日は伊藤商店のwebを作って必要だった、 cssでフッターを固定する場合のメモ。 HTMLソース CSSソース コンテンツの内容によっては、IE6などブラウザで、 精度がかなり落ちてしまうので微調整が必要。 他にもJS [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://oneday.ter.jp/wp-content/uploads/2009/07/090722-700x200.jpg" alt="090722" title="090722" width="700" height="200" class="alignnone size-thumbnail wp-image-488" /></p>
<p>今日は<a href="http://ito.ter.jp" target="_blank">伊藤商店</a>のwebを作って必要だった、<br />
cssでフッターを固定する場合のメモ。</p>
<h3>HTMLソース</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;body&gt;
    &lt;div id=&quot;contents&quot;&gt;
        &lt;h1&gt;ほげ&lt;/h1&gt;
        &lt;p&gt;hogeのコンテンツだよ。&lt;/p&gt;
    &lt;/div&gt;

    &lt;div class=&quot;footer&quot;&gt;
        hoge-Footer contents
    &lt;/div&gt;
&lt;/body&gt;
</pre>
<h3>CSSソース</h3>
<pre class="brush: css; title: ; notranslate">
html, body {
    height: 100%;
}
#contents {
    min-height: 100%;
    height: auto !important;
    height: 100%; /* ie用に設定 */
    margin: 0 auto -100px;
    /* class=&amp;quot;footer&amp;quot;と同じ高さ(100px)の負の値を入力 */
}

.footer {
    height: 100px;
    /*適当に色でもつけてみる*/
    background-color:#666666;
}
</pre>
<p>コンテンツの内容によっては、IE6などブラウザで、<br />
精度がかなり落ちてしまうので微調整が必要。<br />
他にもJSなどでできるようなので、後で試してみようと思う。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/css-xhtml/469.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/css-xhtml/469.html" />
	</item>
		<item>
		<title>bodyタグにスラッグを元にしたCSS ID指定</title>
		<link>http://oneday.ter.jp/wordpress/256.html</link>
		<comments>http://oneday.ter.jp/wordpress/256.html#comments</comments>
		<pubDate>Tue, 30 Jun 2009 14:06:41 +0000</pubDate>
		<dc:creator>イテル</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[bodyタグ]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[id]]></category>
		<category><![CDATA[slug]]></category>
		<category><![CDATA[スラッグ]]></category>

		<guid isPermaLink="false">http://oneday.ter.jp/?p=256</guid>
		<description><![CDATA[ページによってcssの指定を変えたい場合がある。 cssの書き方はさまざまだと思うが、ボク（前の会社のcss大先輩：同級生だけど）の書き方ではbodyにidを記載してカテゴリを分けていた。 そのため、wordpressで [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-thumbnail wp-image-262" title="キャプチャ" src="http://oneday.ter.jp/wp-content/uploads/2009/06/キャプチャ2-700x200.jpg" alt="キャプチャ" width="700" height="200" /></p>
<p>ページによってcssの指定を変えたい場合がある。</p>
<p>cssの書き方はさまざまだと思うが、ボク（前の会社のcss大先輩：同級生だけど）の書き方ではbodyにidを記載してカテゴリを分けていた。</p>
<p>そのため、wordpressでも同様のことができると嬉しい。</p>
<p>標準のタグでもある程度はできるが、post idなどでの指定になるため、ちょいと気持ちが悪い。</p>
<p>ということで、スラッグをidにできないか試したところ実現できそうなので試してみた。</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
//ページのスラッグを取得
if( is_page() ){
$pageid=$post-&gt;ID;
//ページスラッグを取得
$pageSlug = get_page($pageid)-&gt;post_name;
$cssBodyID=' id=&quot;'.$pageSlug.'&quot;';
}else{
$cat = get_the_category();
$catslug = $cat[0]-&gt;category_nicename;
$cssBodyID=' id=&quot;'.$catslug.'&quot;';
}
?&gt;
&lt;body &lt;?php echo $cssBodyID ;?&gt;&gt;
</pre>
<p>上記はページの場合はスラッグを指定し、投稿の場合はカテゴリスラッグでbodyにidを表示するようにしてみた。</p>
<p>もうちょいスマートな書き方がありそうなので、お気づきの方はご教授いただけると幸い。</p>
<p>また、スラッグをidとした場合、スラッグの指定忘れで日本語になってしまうと不具合がでそう。</p>
<p>投稿する際に気をつけねば。</p>
]]></content:encoded>
			<wfw:commentRss>http://oneday.ter.jp/wordpress/256.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://oneday.ter.jp/wordpress/256.html" />
	</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.383 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-06 07:47:01 -->

