<?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>Fatih Hayrioğlu&#039;nun not defteri &#187; zemin-resmi</title>
	<atom:link href="http://www.fatihhayrioglu.com/tag/zemin-resmi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fatihhayrioglu.com</link>
	<description>{ CSS, HTML ve Javascript }</description>
	<lastBuildDate>Thu, 09 Feb 2012 08:44:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=2012</generator>
		<item>
		<title>Sayfa Zeminini Tamamen Kaplayan Resimler Tanımlamak</title>
		<link>http://www.fatihhayrioglu.com/sayfa-zeminini-tamamen-kaplayan-resimler-tanimlamak/</link>
		<comments>http://www.fatihhayrioglu.com/sayfa-zeminini-tamamen-kaplayan-resimler-tanimlamak/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 20:02:10 +0000</pubDate>
		<dc:creator>fatih.hayrioglu</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[background-size]]></category>
		<category><![CDATA[tam ekran]]></category>
		<category><![CDATA[zemin-resmi]]></category>

		<guid isPermaLink="false">http://www.fatihhayrioglu.com/?p=2218</guid>
		<description><![CDATA[Sitem üzerinden birçok mesaj aldım bu konuda. Sonunda yazmaya karar verdim, bir önceki makalemde CSS3&#8217;ün background-size özelliğini anlattım, orada da bahsettiğim gibi background-size özelliğini kullanarak bu işi çok kolay bir şekilde yapabiliriz. Buradaki problemimiz bu özelliği desteklemeyen tarayıcılar için nasıl bir çözüm bulmalıyız. Bu makalede farklı tarayıcılar için sayfamızın zeminini tam kaplayan ardalan resimlerini nasıl [...]]]></description>
			<content:encoded><![CDATA[<p>Sitem üzerinden birçok mesaj aldım bu konuda. Sonunda yazmaya karar verdim, bir önceki makalemde <a href="http://www.fatihhayrioglu.com/css3-background-size-ozelligi/">CSS3&rsquo;ün background-size özelliğini anlattım</a>, orada da bahsettiğim gibi <strong>background-size</strong> özelliğini kullanarak bu işi çok kolay bir şekilde yapabiliriz. Buradaki problemimiz bu özelliği desteklemeyen tarayıcılar için nasıl bir çözüm bulmalıyız. </p>
<p>Bu makalede farklı tarayıcılar için sayfamızın zeminini tam kaplayan ardalan resimlerini nasıl tanımlayacağımızı anlatmaya çalışacağım. </p>
<h3 dir="ltr">CSS3 background-size ile basit şekilde yapalım</h3>
<p>Bir önceki makalede de anlattığım gibi background-size özelliği bu iş için biçilmiş kaftandır. Çok basit bir kod ile istediğimize ulaşırız.</p>
<pre class="brush: css; title: ; notranslate">
html {
       background: url(images/bg.jpg) no-repeat center center fixed;
       -webkit-background-size: cover;
       -moz-background-size: cover;
       -o-background-size: cover;
       background-size: cover;
}
</pre>
<p>Bir örnek yapalım</p>
<pre class="brush: css; title: ; notranslate">
html{
    background:url(&quot;zemin_resmi.jpg&quot;) 0 0 no-repeat fixed;
    background-size:cover;
    -webkit-background-size:cover;
    -moz-background-size:cover;
    -o-background-size:cover;
}
</pre>
<p>Örneği görmek için <a href="http://www.fatihhayrioglu.com/dokumanlar/tam_sayfa_bg.html">tıklayınız.</a></p>
<p><img src="https://lh6.googleusercontent.com/x55IiCT52mJIMb9oYddTeHpX7Ww7ti3puoZiped0VQ-SflPtR_mrldscvuWoco7aOWi0dbQ2llnOVRuch-2dgpR_LSkZU76CiKam4NThM2DYry7j-Po" alt="" width="500px;" height="366px;" /></p>
<p>Ardalan resmini <a href="http://interfacelift.com/wallpaper/details/2421/empty_bottles.html">http://interfacelift.com/wallpaper/details/2421/empty_bottles.html</a> aldım.</p>
<p><strong>html</strong> elementine vermemizin nedeni <strong>body</strong> tanımlamalarında bazı tarayıcılarda sorun yaşamamızdır. Kaydırma çubuğunun hareketi ile zemin resmi kaymaması için resmi sabitledik(<strong>fixed</strong>). <strong>cover</strong> özelliği ile resmi zemine yaydık. <a href="http://www.fatihhayrioglu.com/css3-background-size-ozelligi/">Daha detaylı bilgi için tıklayınız.</a>
</p>
<div class="tarayiciuyum"><strong>Browser Uyumu:</strong><br />
  Internet Explorer 9+<br />
  Firefox 3.6+(-moz-), 4+(standart)<br />
  Chrome1 (-webkit-),3+(standart)<br />
  Safari3+(-webkit-), 4.1(standart)<br />
Opera 9.5+(-o-), 10+(standart)</div>
<p>İnternet Explorer 9 sürümünden önceki sürümlerinin bu özelliği desteklememesidir. İnternet Explorer için <strong>filter</strong> ile bir çözüm üretebiliriz. </p>
<pre class="brush: css; title: ; notranslate">
    filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='.zemin_resmi.jpg', sizingMethod='scale');
    -ms-filter: &quot;progid:DXImageTransform.Microsoft.AlphaImageLoader(src='zemin_resmi.jpg', sizingMethod='scale')&quot;;
</pre>
<p>Bu kod ile ie içinde çözüm üretilmiş olacaktır. Linklerde ve içerik seçmede bazı orunlar olabiliyor.</p>
<h3 dir="ltr">Tüm Tarayıcılar İçin Çözüm</h3>
<pre class="brush: css; title: ; notranslate">
&lt;div id=&quot;tamEkranArdAlan&quot;&gt;&lt;img src=&quot;http://www.fatihhayrioglu.com/images/emptybottles.jpg&quot; width=&quot;100%&quot; height=&quot;100%&quot; /&gt;&lt;/div&gt;
&lt;div id=&quot;icerik&quot;&gt;
...
&lt;/div&gt;
</pre>
<p>Sayfamızı içerik ve ardalan resmi olarak ikiye ayırıyoruz.</p>
<pre class="brush: css; title: ; notranslate">
html, body {height:100%; margin:0; padding:0;}
</pre>
<p>Sayfanın boşluklarını sıfırlıyoruz.</p>
<pre class="brush: css; title: ; notranslate">
#tamEkranArdAlan {position:fixed; top:0; left:0; width:100%; height:100%;}
</pre>
<p>Zemine yerleştirilecek resmi sabitleyip üstten ve soldan başlangıç noktasına yerleştiriyoruz ve genişlik ve yükseklik değerini %100 veriyoruz.</p>
<pre class="brush: css; title: ; notranslate">
#icerik {position:relative; z-index:1; width:650px; padding:20px; font:14px/1.8em Arial; margin:40px auto; border-radius:10px; color:#333; background-color:#fff}
</pre>
<p>İçerik alanını <strong>postion:relative; z-index:1</strong> değeri atayarak içerikteki seçilme ve linklerde sorun olmasını engelliyoruz. Diğer tanımlar içerik alanının görselliğini ayarlamak içindir.</p>
<p>Bu kodlar ie6 hariç çalışırken ie6&rsquo;da çalışmıyor ie6&rsquo;da çalışması için </p>
<pre class="brush: css; title: ; notranslate">
*html {overflow-y:hidden;}
*html body {overflow-y:auto;}
*html #tamEkranArdAlan {position:absolute; z-index:-1;}
*html #icerik {position:static;padding:20px;}
</pre>
<p>ie6 <strong>postipon:fixed</strong> desteklemediği için <strong>postion:absolute</strong> değeri tanımlıyoruz. İçerik alanınıda <strong>postion:static</strong> tanımlıyoruz. Kaydırma çubuğu sorunlarını halletmek için <strong>body</strong> ve <strong>html</strong> tanımlarımızı yapıyoruz. </p>
<p>Sonuç olarak tüm tarayıcılarda çalışan sayfa zeminini kapsayan zemin resmi tanımlamış olduk.</p>
<p><iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/fatihhayri/ePxPv/embedded/css,html,result"></iframe> </p>
<h3 dir="ltr">Sonuç</h3>
<p>Sonuç olarak CSS3 ile birlikte gelen <strong>background-size</strong> özelliği tam işimizi görsede İnternet Explorer&rsquo;un desteklememesi projelerimizde uygulamak için bizi düşündürüyor.</p>
<p>Tüm tarayıcıların desteklediği ikinci yöntem sadece CSS ile çözüm ürettiği için tercih edilebilir. Ayrıca javascript ile bazı çözümler olsa da ben css ile çözümü olan bir kodu javascript ile çözme taraftarı değilim. Javascript uygulamaları için<a href="http://css-tricks.com/3458-perfect-full-page-background-image/"> http://css-tricks.com/3458-perfect-full-page-background-image/</a> linkindeki örnekleri incelemenizi öneriyorum. </p>
<p>Baktığım sitelerdeki uygulanabilir bu iki yöntemi sizlerle paylaştım uyguladıkça ve diğer yöntemleri gördükçe buraya ekleme yapabilirim. Birazda ihtiyaca göre yöntem uygulamak gerekiyor bu işte.</p>
<p>Kalın sağlıcakla</p>
<h3 dir="ltr">Kaynaklar</h3>
<ul>
<li><a href="http://css-tricks.com/3458-perfect-full-page-background-image/">http://css-tricks.com/3458-perfect-full-page-background-image/</a></li>
<li><a href="http://cookbooks.adobe.com/post_Scale_Background_image_to_browser_size-17590.html">http://cookbooks.adobe.com/post_Scale_Background_image_to_browser_size-17590.html</a></li>
<li><a href="http://www.paulmccrodden.com/2011/02/problems-css3-background-size-cover-iefilters/">http://www.paulmccrodden.com/2011/02/problems-css3-background-size-cover-iefilters/</a></li>
<li><a href="http://www.pziecina.com/design/turorial_demos/resize_background.php">http://www.pziecina.com/design/turorial_demos/resize_background.php</a></li>
<li><a href="http://css-tricks.com/766-how-to-resizeable-background-image/">http://css-tricks.com/766-how-to-resizeable-background-image/</a></li>
<li><a href="http://paulmason.name/blog/item/full-screen-background-image-pure-css-code">http://paulmason.name/blog/item/full-screen-background-image-pure-css-code</a></li>
<li><a href="http://www.quackit.com/html/codes/html_stretch_background_image.cfm">http://www.quackit.com/html/codes/html_stretch_background_image.cfm</a></li>
<li><a href="http://www.cssplay.co.uk/layouts/background.html">http://www.cssplay.co.uk/layouts/background.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.fatihhayrioglu.com/sayfa-zeminini-tamamen-kaplayan-resimler-tanimlamak/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CSS ile Menü Oluşturmak V &#8211; Resimli Menüler</title>
		<link>http://www.fatihhayrioglu.com/css-ile-menu-olusturmak-v-resimli-menuler/</link>
		<comments>http://www.fatihhayrioglu.com/css-ile-menu-olusturmak-v-resimli-menuler/#comments</comments>
		<pubDate>Tue, 21 Nov 2006 15:03:36 +0000</pubDate>
		<dc:creator>fatih.hayrioglu</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Standartları]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[arkaplan-resmi]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[Image-Replacement]]></category>
		<category><![CDATA[menü]]></category>
		<category><![CDATA[resimli-menü]]></category>
		<category><![CDATA[zemin-resmi]]></category>

		<guid isPermaLink="false">http://www.fatihhayrioglu.com/?p=222</guid>
		<description><![CDATA[&#34;Arkaplan Resmi kaydırmaca&#34; ile Resimli Menüler Arkaplan Resmi kaydırmaca tanımlamasını cemsid&#8216;den aldım. CSS ile menü yapımı serimize devam ediyoruz. CSS ile yapılan bir çok menü örneği mevcut biz burada bunları katagorize edip her bir katagoriye bir örnek yaparak mantığını anlatmaya çalıyoruz, mantığını anladıktan sonra CSS ile yapılan tüm menüleri yapabileceğimize inanıyorum. CSS menülerinin vazgeçilmezi sırasız [...]]]></description>
			<content:encoded><![CDATA[<h3>&quot;Arkaplan Resmi kaydırmaca&quot; ile Resimli Menüler </h3>
<p> Arkaplan Resmi kaydırmaca tanımlamasını <a href="http://www.cemshid.com/makale/arkaplan_resmi_kaydirmaca.html">cemsid</a>&#8216;den aldım. CSS ile menü yapımı serimize devam ediyoruz. CSS ile yapılan bir çok menü örneği mevcut biz burada bunları katagorize edip her bir katagoriye bir örnek yaparak mantığını anlatmaya çalıyoruz, mantığını anladıktan sonra CSS ile yapılan tüm menüleri yapabileceğimize inanıyorum.<br />
  <span id="more-222"></span>
</p>
<p>CSS menülerinin vazgeçilmezi sırasız listeleri(&lt;ul&gt;) kullanarak her bir linkin iki resimi bulunan(bir normal hali, diğeri fare imlecinin üzerine gelince görünecek resim) menü oluşturacağız. </p>
<p>Bu menü sayfa yüklenmeden yüklendiği için javascript ile yapılan rollover menülerden avantajlıdır ve Internet Explorer&#8217;da Temporary Internet     Files &gt; Settings &gt;  &#8216;Every     visit to page.&#8217; seçeneği seçili olan kullanıcılar için biçilmiş kaftandır. Ayrıca CSS ile yapılan menülerdeki avantajlara(kolay ekleme ve düzenleme, esnek yapı vb.) sahiptir tabi ki. </p>
<p>Bu metod cemsid&#8217;inde açıkladığı gibi arkaplan resmi(background-image) kaydırarak yapılıyor. Genelde bu tip menüler resim içeren veya anti-aliased metinlerin kullanıldığı durumlarda kullanılır.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;ul id=&quot;menu&quot; &gt;
&lt;li id=&quot;elma&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;Elma&quot;&gt;Elma&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;armut&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;Armut&quot;&gt;Armut&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;muz&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;Muz&quot;&gt;Muz&lt;/a&gt;&lt;/li&gt;
&lt;li id=&quot;kivi&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;Kivi&quot;&gt;Kivi&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>Görüldüğü gibi diğer menü başlangıcından farkı olmayan-bir ek hariç- bir kodlama. Hariç olan ek her menu elemanına bir <strong>id</strong> atamamız. Çünkü her menü elemanı için bir resim tanımlaması yapacağız. Manav dükkanı açıyoruz :)</p>
<p>şimdi menümüzü oluşturan resimi hazırlamaya geldi sıra. Menü resmini oluştururken bir normal halini ve hemen altına fare imleci üzerine geldiğindeki halini koyup resmi kaydedeceğiz. Bu işlem için Photosohop, Firefowrk, PaintShopPro vb. programlar kullanabilrisiniz. </p>
<p><img src="/images/menu.jpg" width="500" height="108"></p>
<p>Menüdeki margin, padding ve imgeleri kaldıralım. Boyutlarını ve konumunu tanımlayalım:</p>
<pre class="brush: css; title: ; notranslate">
ul#menu {
    height: 54px;
    width: 500px;
    margin: 0;
    padding: 0;
    position: relative;
}
</pre>
<p align="center"><img src="/images/resimlimenu_01.jpg" width="50" height="76"> </p>
<p>Menümüzü yatay olarak sıralamak için</p>
<pre class="brush: css; title: ; notranslate">
ul#menu li {
    list-style: none;
    position: absolute;
}
</pre>
<p><img src="/images/resimlimenu_02.gif" width="45" height="19"> </p>
<p>Menü elemanlarının yükseklikleri sabit olduğu için hepsine ortak tanımlama yapıyoruz, hepsini kendine has kapsama alanı olması için blokladık(display:block) ve konumlandırdık(postion:relative). </p>
<pre class="brush: css; title: ; notranslate">
ul#menu li a {
    height: 54px;
    display: block;
    position:relative;
}
</pre>
<p>Her menü elemanı için kendi genişliği ve arkaplan resmindeki(menu.jpg) yerini belirleyelim.</p>
<pre class="brush: css; title: ; notranslate">
#elma a{
    width:130px;
    background: url(images/menu.jpg) 0 0 no-repeat;
}
#armut a{
    width:142px;
    background: url(images/menu.jpg) -130px 0 no-repeat;
}
#muz a{
    width:120px;
    background: url(images/menu.jpg) -272px 0 no-repeat;
}
#kivi a{
    width:108px;
    background: url(images/menu.jpg) -392px 0 no-repeat;
}
</pre>
<p>ve tüm menü elementlerinin soldan konumu belirleyelim. </p>
<pre class="brush: css; title: ; notranslate">
#elma {left: 0px;}
#armut {left: 130px;}
#muz {left: 272px;}
#kivi {left: 392px;}
</pre>
<p><img src="/images/resimlimenu_03.jpg" width="500" height="54"></p>
<p>Resimler üzerindeki metinleri kaldırmak için </p>
<pre class="brush: css; title: ; notranslate">
ul#menu li a {
    text-indent: -9999px;
    text-decoration: none;
}
</pre>
<p><img src="/images/resimlimenu_04.jpg" width="500" height="54"></p>
<p>Menümüz tamam. şimdi de rollover efekti vermek için <strong>a:hover</strong> arkaplan resimlerinin konumunu belirleyelim. Konumunu yazarken sadece yükseliği üstten konumu değiştirdiğimize dikkat edin. </p>
<pre class="brush: css; title: ; notranslate">
#elma a:hover{
    width:130px;
    background: url(images/menu.jpg) 0 -54px no-repeat;
}
#armut a:hover{
    width:142px;
    background: url(images/menu.jpg) -130px -54px no-repeat;
}
#muz a:hover{
    width:120px;
    background: url(images/menu.jpg) -272px -54px no-repeat;
}
#kivi a:hover{
    width:108px;
    background: url(images/menu.jpg) -392px -54px no-repeat;
}
</pre>
<p><img src="/images/resimlimenu_06.jpg" width="500" height="54"></p>
<p>Son olarakta bir bölümde olduğunda o bölümün aktif görünmesini sağlamak için, genel de bunu için a:hover durumu normal durum olarak tanımlanır. Bizde öyle yapalım. Mesela <strong>Muz</strong> bölümünde olduğumuzu farz edelim. </p>
<pre class="brush: xml; title: ; notranslate">
&lt;ul id=&quot;menu&quot; &gt;
    &lt;li id=&quot;elma&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;Elma&quot;&gt;Elma&lt;/a&gt;&lt;/li&gt;
    &lt;li id=&quot;armut&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;Armut&quot;&gt;Armut&lt;/a&gt;&lt;/li&gt;
    &lt;li id=&quot;muz&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;Muz&quot; class=&quot;secili&quot; &gt;Muz&lt;/a&gt;&lt;/li&gt;
    &lt;li id=&quot;kivi&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;Kivi&quot;&gt;Kivi&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<pre class="brush: css; title: ; notranslate">
#elma a.secili{
    width:130px;
    background: url(images/menu.jpg) 0 -54px no-repeat;
}
#armut a.secili{
    width:142px;
    background: url(images/menu.jpg) -130px -54px no-repeat;
}
#muz a.secili{
    width:120px;
    background: url(images/menu.jpg) -272px -54px no-repeat;
}
#kivi a.secili{
    width:108px;
    background: url(images/menu.jpg) -392px -54px no-repeat;
}
</pre>
<p><iframe src="/dokumanlar/menu_5.html" width="500" height="110" frameborder="0" scrolling="no"></iframe></p>
<p>Örnek kodları indirmek için <a href="/dokumanlar/menu5.zip">tıklayınız.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fatihhayrioglu.com/css-ile-menu-olusturmak-v-resimli-menuler/feed/</wfw:commentRss>
		<slash:comments>59</slash:comments>
		</item>
	</channel>
</rss>

