<?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>Jorge Pedret &#187; CSS</title>
	<atom:link href="http://jorgepedret.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://jorgepedret.com</link>
	<description>Freelance Web Developer + Front End Designer</description>
	<lastBuildDate>Wed, 25 Jan 2012 16:43:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>How to create a cool css background transition effect</title>
		<link>http://jorgepedret.com/web-development/how-to-create-a-cool-css-background-transition-effect/</link>
		<comments>http://jorgepedret.com/web-development/how-to-create-a-cool-css-background-transition-effect/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 21:38:14 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[think geek]]></category>
		<category><![CDATA[transition]]></category>

		<guid isPermaLink="false">http://jorgepedret.com/?p=319</guid>
		<description><![CDATA[Learn how to create a really cool background transition effect like the one seeing on Think Geek's website. <a href="http://jorgepedret.com/sandbox/tg-effect/">Check out the Demo</a>]]></description>
			<content:encoded><![CDATA[<p>I first saw this effect in the popular website <a href="https://www.thinkgeek.com/" target="_blank">Think Geek</a>, when you scroll down all the way to the bottom you can see how it makes a transition from cool Robots to cool Zombies.</p>
<p>It bugged my mind for a bit so I decided to figure out how they did it. It turns out it&#8217;s a lot more simple than you think, all you need is two images and CSS.</p>
<p><a target="_blank" href="http://jorgepedret.com/sandbox/tg-effect/" class="woo-sc-button  custom large" style="background:;border-color:"><span class="woo-tick">See the demo</span></a> <a href="http://jorgepedret.com/wp-content/uploads/2011/04/tg-effect-demo.zip" class="woo-sc-button  custom large" style="background:;border-color:"><span class="woo-tick">Download the demo files</span></a></p>
<p>Here&#8217;s how you can easily create the effect:</p>
<h2>Start by creating the transition image</h2>
<p><a href="http://jorgepedret.com/wp-content/uploads/2011/04/Screen-shot-2011-04-22-at-1.36.53-PM.png"><img class="alignnone size-medium wp-image-320" title="Screen shot 2011-04-22 at 1.36.53 PM" src="http://jorgepedret.com/wp-content/uploads/2011/04/Screen-shot-2011-04-22-at-1.36.53-PM-300x86.png" alt="" width="300" height="86" /></a></p>
<ol>
<li>Create a 1200 x 300 pixels image in Photoshop with transparent background.</li>
<li>Create the images that you want to see at the top of the page and make sure they&#8217;re only in #666.</li>
<li>Then, create the images that you want to see at the bottom of the page and make sure they&#8217;re only in #000.</li>
<li>Save it as a PNG named <strong>bottom-bg.png</strong>, making sure there&#8217;s no background color. The only two colors that can exist in this image are #666 and #000.</li>
</ol>
<div class="woo-sc-box note   ">The two top and bottom images can&#8217;t be touching each other, they have  to be separate, otherwise the effect will not work. They can be very  close though.</div>
<div class="woo-sc-box info   ">This is the design that Think Geek used: <a href="https://www.thinkgeek.com/images/sitewide/backgrounds/robozombies7.png" target="_blank">https://www.thinkgeek.com/images/sitewide/backgrounds/robozombies7.png</a></div>
<h2>Next, create the background image</h2>
<p><a href="http://jorgepedret.com/wp-content/uploads/2011/04/Screen-shot-2011-04-22-at-1.55.50-PM.png"><img class="alignnone size-medium wp-image-322" title="Screen shot 2011-04-22 at 1.55.50 PM" src="http://jorgepedret.com/wp-content/uploads/2011/04/Screen-shot-2011-04-22-at-1.55.50-PM-300x258.png" alt="" width="300" height="258" /></a></p>
<ol>
<li>Create a 10 x 700 pixels image in Photoshop</li>
<li>Select the gradient tool and configure the gradient to be from #000 to #666</li>
<li>Vertically drag it from the very top to the middle of the image approximately.</li>
<li>Save that as a PNG file named <strong>body-bg.png</strong> and you&#8217;re done with the background image.</li>
</ol>
<div class="woo-sc-box info   ">Once you understand the way this effect works, you will be able to use whichever colors you want. But for now we&#8217;re sticking to #000 and #666</div>
<h2>And finally, write the CSS and HTML</h2>
<p>Let&#8217;s start with the HTML:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;fancywrap&quot;&gt;
	&lt;div id=&quot;wrap&quot;&gt;
		&lt;article&gt;
		&lt;!-- Your content here --&gt;
		&lt;/article&gt;
	&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<div class="woo-sc-box info   ">This is a simple structure for this demo, but you can adapt it to your own project.</div>
<p>For the styles, you&#8217;re going to attach to your body tag the background image that you created in step 2 and make the color background #000.</p>
<pre class="brush: css; title: ; notranslate">
body{
	background: #000 url(body-bg.png) left bottom repeat-x;
}
</pre>
<p>Next step is styling the .facywrap class by attaching the transition image to it. And the secret for this effect to work is to use the CSS property <code>background-attachment: fixed</code>; like this:</p>
<pre class="brush: css; title: ; notranslate">
.fancywrap{
	background: url('bottom-bg.png') repeat-x;
	background-position: center bottom;
	background-attachment: fixed;
}
</pre>
<p>See the full demo code in Github: <a href="https://gist.github.com/937679" target="_blank">https://gist.github.com/937679</a></p>
<p>That&#8217;s it! Once you understand how it works, you will be able to choose your own color combination other than the boring #000 and #666.</p>
<p><a target="_blank" href="http://jorgepedret.com/sandbox/tg-effect/" class="woo-sc-button  custom large" style="background:;border-color:"><span class="woo-tick">See the demo</span></a>  <a href="http://jorgepedret.com/wp-content/uploads/2011/04/tg-effect-demo.zip" class="woo-sc-button  custom large" style="background:;border-color:"><span class="woo-tick">Download the demo files</span></a></p>
<hr />
<a href="http://feedburner.google.com/fb/a/mailverify?uri=JorgePedret&amp;loc=en_US" class="woo-sc-button  orange" ><span class="woo-tick">Get updates via Email</span></a>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/web-development/how-to-create-a-cool-css-background-transition-effect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Patternify: CSS Pattern Generator</title>
		<link>http://jorgepedret.com/uncategorized/patternify-css-pattern-generator/</link>
		<comments>http://jorgepedret.com/uncategorized/patternify-css-pattern-generator/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 16:56:00 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[utilities]]></category>

		<guid isPermaLink="false">http://jorgepedret.com/uncategorized/patternify-css-pattern-generator/</guid>
		<description><![CDATA[Generate patterns to use with CSS. You can choose to get the PNG format or the raw base 64 data so it can be directly included in your CSS. Pretty awesome!]]></description>
			<content:encoded><![CDATA[<p>Generate patterns to use with CSS. You can choose to get the PNG format or the raw base 64 data so it can be directly included in your CSS. Pretty awesome!</p>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/uncategorized/patternify-css-pattern-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS won&#8217;t style my HTML5 markup in Internet Explorer!</title>
		<link>http://jorgepedret.com/web-development/html5-web-development/css-wont-style-my-html5-markup-in-internet-explorer/</link>
		<comments>http://jorgepedret.com/web-development/html5-web-development/css-wont-style-my-html5-markup-in-internet-explorer/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 02:34:44 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[ie8]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[new html5 tags]]></category>

		<guid isPermaLink="false">http://jorgepedret.com/?p=169</guid>
		<description><![CDATA[You built your whole website using html5 new shiny tags, you're so proud of yourself, it looks great in your development browser. Time to give it a test in Internet Explorer to see what it looks like. It looks a lot worst than you was expecting... What the heck is going on?

Make html5 work under ie6, ie7 &#038; ie8 by adding this small JavaScript code.]]></description>
			<content:encoded><![CDATA[<p>You built your whole website using html5 new shiny tags, you&#8217;re so proud of yourself, it looks great in your development browser!!</p>
<p>It&#8217;s finally time to give it a test in Internet Explorer, let&#8217;s see how it looks like&#8230;</p>
<p>WHAT??? That looks a lot worst than I was expecting&#8230; What the heck is going on?</p>
<p>You try changing your css, but explorer doesn&#8217;t change at all&#8230; You verify if you&#8217;re actually working on the right file, and yes in deed, you are. You try to add some basic css properties, but again, it doesn&#8217;t change a bit. The problem is&#8230;</p>
<h3>Internet Explorer completely ignores html5 new tags</h3>
<p>OMG! Until when this stupid browser is going to give me head aches &#8211; you say out loud.</p>
<p>At this point you have two options:</p>
<ol>
<li>Change your entire markup and css to use old tags</li>
<li>Use Remy Sharp&#8217;s fix. The only downsize: It completely depends on Javascript</li>
</ol>
<p>IE simply ignores all the elements it doesn&#8217;t recognize, regardless of CSS. By using javascript&#8217;s function document.createElement(), we iterate through the markup and recreate all the tags that are not recognized by IE.</p>
<h3>Quick copy/paste solution</h3>
<p>Here is the code taken directly from <a href="http://remysharp.com/2009/01/07/html5-enabling-script/">Remy&#8217;s site</a>:</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;!--[if IE]&gt;
&lt;script src=&quot;http://html5shim.googlecode.com/svn/trunk/html5.js&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;
</pre>
<p>I&#8217;m thinking it might be a good idea to condition the code to IE versions lower than 8, since IE9 will have html5 support and it might be coming soon, but that&#8217;s up to you:</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;!--[if lte IE 8]&gt;
&lt;script src=&quot;http://html5shim.googlecode.com/svn/trunk/html5.js&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;
</pre>
<p>I feel stupid for not being aware and for not testing earlier in IE. It took me a while to figure out what was going on.</p>
<p>Get more information from this sites:<br />
<a href="http://net.tutsplus.com/tutorials/html-css-techniques/how-to-make-all-browsers-render-html5-mark-up-correctly-even-ie6/">http://net.tutsplus.com/tutorials/html-css-techniques/how-to-make-all-browsers-render-html5-mark-up-correctly-even-ie6/</a><br />
<a href="http://remysharp.com/2009/01/07/html5-enabling-script/">http://remysharp.com/2009/01/07/html5-enabling-script/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/web-development/html5-web-development/css-wont-style-my-html5-markup-in-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix z-index problem in ie7 with jQuery?</title>
		<link>http://jorgepedret.com/web-development/how-to-fix-z-index-problem-in-ie7-with-jquery/</link>
		<comments>http://jorgepedret.com/web-development/how-to-fix-z-index-problem-in-ie7-with-jquery/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 03:50:47 +0000</pubDate>
		<dc:creator>Jorge Pedret</dc:creator>
				<category><![CDATA[bug]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE7]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[z-index]]></category>

		<guid isPermaLink="false">http://www.jorgepedret.com/blog/?p=5</guid>
		<description><![CDATA[A quick post, I was just having problems in my website with my beautiful picture showing on top of everything. It was showing fine in FF but in Internet Explorer 7 it was showing behind, so you could only see like half of my face and that&#8217;s not fare for anyone. I found this cool [...]]]></description>
			<content:encoded><![CDATA[<p>A quick post, I was just having problems in my website with my beautiful picture showing on top of everything. It was showing fine in FF but in Internet Explorer 7 it was showing behind, so you could only see like half of my face and that&#8217;s not fare for anyone.</p>
<p>I found this <a class="external" title="Vance Lucas Website" rel="colleage" href="http://www.vancelucas.com/blog/fixing-ie7-z-index-issues-with-jquery/" target="_blank">cool website</a> where I read that ie7 does something weird with the stack order when it renders the page and solves the problem using jQuery. Surprisingly I just copied and pasted the code (after analyzing it of course) and it fixed my problem!</p>
<p>Here is the code! for more details on this solution go to <a href="http://www.vancelucas.com/blog/fixing-ie7-z-index-issues-with-jquery/" target="_blank">Vance Lucas Website</a></p>
<pre class="brush: jscript; title: ; notranslate">

$(function() {
	var zIndexNumber = 1000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 10;
	});
});
</pre>
]]></content:encoded>
			<wfw:commentRss>http://jorgepedret.com/web-development/how-to-fix-z-index-problem-in-ie7-with-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

