<?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>jc-designs.net &#187; CSS</title>
	<atom:link href="http://jc-designs.net/blog/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://jc-designs.net/blog</link>
	<description>jc-designs blog</description>
	<lastBuildDate>Thu, 09 Sep 2010 03:27:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adding Scripts, CSS, And Extras &#8211; When Is It Too Much?</title>
		<link>http://jc-designs.net/blog/2010/09/adding-scripts-css-and-extras-when-is-it-too-much/</link>
		<comments>http://jc-designs.net/blog/2010/09/adding-scripts-css-and-extras-when-is-it-too-much/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 02:40:58 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=541</guid>
		<description><![CDATA[Let&#8217;s stick that in there too!
Ok, I will admit that this topic just popped into my head, mainly because of what I was doing at work, and then thinking of the HTML5 Boilerplate. I&#8217;m using that as a starting point to illustrate what I am talking about, not bashing it. I think the template is [...]]]></description>
			<content:encoded><![CDATA[<h3>Let&#8217;s stick that in there too!</h3>
<p>Ok, I will admit that this topic just popped into my head, mainly because of what I was doing at work, and then thinking of the <a href="http://html5boilerplate.com/">HTML5 Boilerplate</a>. I&#8217;m using that as a starting point to illustrate what I am talking about, not bashing it. I think the template is awesome and I am using it in my personal projects.</p>
<p>Let&#8217;s say we are using it to start a new site. It has a lot of awesome things in it to compensate for a ton of stuff. It has jQuery, a ready to go script page for your js, a nicely organized style sheet, dd-belatedpng.js for png support in IE6, Google Analytics code, Modernizer 1.5 js for HTML5 tag support in browsers that don&#8217;t actually support HTML5&#8230;and a few other things I can&#8217;t remember at the moment. For argument&#8217;s sake though, let&#8217;s just pretend that is it.</p>
<p><span id="more-541"></span></p>
<h3>Now you start adding in your stuff</h3>
<p>The blank js file for your code is already taken care of, so you don&#8217;t have to add that. But maybe you are adding a piece of Flash, which naturally leads you to throwing swfobject in. Ohhh, and that neat <a href="http://nivo.dev7studios.com/">Nivo slider</a> on there too! Hmmm&#8230;.ok, downloaded and now added the plugin to your page.</p>
<p>That should be it right? Oh crap! Since we are being extra cool and tricky, we&#8217;ll need some sort of lightbox plugin, so insert that over there. THAT should be about it&#8230;oh&#8230;you are right, we want to use some sort of easing for that bit of jQuery you were planning, better put that in its correct spot. Done? Maybe?</p>
<h3>Is there such a thing as too much</h3>
<p>This is just the kind of stuff that I can think of adding that might make sense. You could probably take a few of those off if we are being reasonable. I&#8217;m a reasonable kind of guy. Now take into account a customer who thinks they know what the #@$% they are doing and says &#8220;I saw this piece of utter crap on this other site, and I want mine to do that to. Oh, and the twitter-y posting thing on the sidebar thinga-ma-jigger, ya I want that also. Ohhhh, you know what would also be the cat&#8217;s meow? That other piece of stupid I can barely describe to you in regular English, but is nearly impossible without you seeing my hand movements!&#8221;</p>
<p>Now that was sort of for comic relief, but I think you get the point. Go back to before the made up customer bit. Is there a point where it is just too much being added? Where does it stop? The HTML5 boilerplate is awesome the way it is. I can add my own jQuery functions without adding another request, it takes care of a lot of old browser issues (which for some reason I am very opposed to letting go for some idiot reason), and basically is my dream starting template. There are going to be a ton of people adding on to it though. Tons more scripts, and what-not&#8230;PLUS things we haven&#8217;t even heard of yet to be inserted into the page later.</p>
<p>I don&#8217;t want to use the word, but all I can think of is bloated. A word I use to describe certain IDE&#8217;s I have tried that have too many feaures. But honestly, do we actually need to use all that crap? For all the headaches we can think of in web development, IE, with all its versions, really adds to this &#8220;bloat&#8221;. If you dropped everything but IE9, when it comes out of course, you could probably drop the modernizer js, the png fix, no more PIE, and the other crap we need to make the lesser versions work. This is BEFORE we actually do ANY kind of design and layout work, too!</p>
<p>I&#8217;m not trying to tell you what to add or not to add to your websites to make it awesome. I&#8217;m just trying to make you stop and think for a minute, and maybe answer my question in the comments (they would be very welcome!). So&#8230;..where, if there is such a thing, is the cut off point, where we just say &#8220;This is getting ridiculous! No more clutter!&#8221; Maybe we aren&#8217;t there yet, but it just seems like we are getting close to that line with every new bit of cool we add.</p>
<p>I&#8217;ll leave you with a musical quote that has nothing to do with this topic, because I am listening to Children of Bodom right now (favorite band at the moment): &#8220;Waiting for you I want to just tell you, if you want peace, prepare for war!&#8221;</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=541" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2010/09/adding-scripts-css-and-extras-when-is-it-too-much/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Poor Man&#8217;s CSS3 Button</title>
		<link>http://jc-designs.net/blog/2010/09/the-poor-mans-css3-button/</link>
		<comments>http://jc-designs.net/blog/2010/09/the-poor-mans-css3-button/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 19:18:50 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=534</guid>
		<description><![CDATA[I call them Pez
I received a tweet the other day about these cool CSS3 buttons called BonBon Buttons. The site says they are named after the French word for candy, but after looking at them, they look like Pez to me. Hmmm&#8230;that is what I will call mine&#8230;Pez! Regardless they are very pretty. Even better, [...]]]></description>
			<content:encoded><![CDATA[<h3>I call them Pez</h3>
<p>I received a tweet the other day about these cool CSS3 buttons called <a href="http://lab.simurai.com/css/buttons/">BonBon Buttons</a>. The site says they are named after the French word for candy, but after looking at them, they look like Pez to me. Hmmm&#8230;that is what I will call mine&#8230;Pez! Regardless they are very pretty. Even better, the creator of them lists where it won&#8217;t work. He was just tooling around one day and made these buttons. Well, I decided to do the &#8220;poor man&#8217;s version&#8221; of those. And unlike the BonBon buttons, my Pez button will work in IE6 as long as you use <a href="http://css3pie.com/">CSS PIE</a>, with the exception of text-shadow, and the radial gradient. Those two properties don&#8217;t add all that much, and even without them they look good in IE.</p>
<p><span id="more-534"></span><br />
<a href="http://www.jc-designs.net/demo/button.html">View Demo</a></p>
<h3>Are there 4 tons of CSS involved?</h3>
<p>There is well over 100 lines of CSS in the BonBon version, so I wanted to reduce that amount to something close to manageable. It still looks good, but I had to cut a bunch  of stuff out. Here is a look at the actual CSS code for my button.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;color: #439AD0; font-weight: bold;">a <span style="color: #00AA00;color: #439AD0;">&#123;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">position</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">relative</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">font-size</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">24px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">font-weight</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">bold</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">font-family</span><span style="color: #00AA00;color: #439AD0;">:</span> Arial<span style="color: #00AA00;color: #439AD0;">,</span> Helvetica<span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #993333;color: #439AD0;">sans-serif</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">color</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc00cc;">#76A14B</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">text-decoration</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">none</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">text-align</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">center</span><span style="color: #00AA00;color: #439AD0;">;</span>
-webkit-border-radius<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">25px</span> <span style="color: #933;">10px</span> <span style="color: #933;">25px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;color: #439AD0;">;</span>
-moz-border-radius<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">25px</span> <span style="color: #933;">10px</span> <span style="color: #933;">25px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;color: #439AD0;">;</span>
border-radius<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">25px</span> <span style="color: #933;">10px</span> <span style="color: #933;">25px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">border</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">2px</span> <span style="color: #993333;color: #439AD0;">solid</span> <span style="color: #cc00cc;">#BFE599</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">padding</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">10px</span> <span style="color: #933;">20px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">display</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">block</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">width</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">100px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">margin</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc66cc;color: #439AD0;">0</span> <span style="color: #993333;color: #439AD0;">auto</span><span style="color: #00AA00;color: #439AD0;">;</span>
-moz-box-shadow<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">6px</span> <span style="color: #933;">0px</span> <span style="color: #cc00cc;">#76a14b</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">0</span> <span style="color: #933;">12px</span> <span style="color: #933;">9px</span> <span style="color: #cc00cc;">#666666</span><span style="color: #00AA00;color: #439AD0;">;</span>
-webkit-box-shadow<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">6px</span> <span style="color: #933;">0px</span> <span style="color: #cc00cc;">#76a14b</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">0</span> <span style="color: #933;">12px</span> <span style="color: #933;">9px</span> <span style="color: #cc00cc;">#666666</span><span style="color: #00AA00;color: #439AD0;">;</span>
box-shadow<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">0px</span> <span style="color: #933;">6px</span> <span style="color: #933;">0px</span> <span style="color: #cc00cc;">#76a14b</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">0</span> <span style="color: #933;">12px</span> <span style="color: #933;">9px</span> <span style="color: #cc00cc;">#666666</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">text-shadow</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#ffffff</span><span style="color: #00AA00;color: #439AD0;">;</span>
behavior<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">url</span><span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/PIE.htc</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span>
&nbsp;
<span style="color: #6666ff;color: #439AD0;">.glassy</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">background</span><span style="color: #00AA00;color: #439AD0;">:</span> -moz-radial-gradient<span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #993333;color: #439AD0;">center</span> <span style="color: #000000; font-weight: bold;color: #439AD0;">top</span> <span style="color: #00AA00;color: #439AD0;">,</span> ellipse farthest-corner<span style="color: #00AA00;color: #439AD0;">,</span> rgba<span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #cc66cc;color: #439AD0;">255</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">255</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">255</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">0.7</span><span style="color: #00AA00;color: #439AD0;">&#41;</span> <span style="color: #933;"><span style="color: #cc66cc;color: #439AD0;">0</span>%</span><span style="color: #00AA00;color: #439AD0;">,</span> rgba<span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #cc66cc;color: #439AD0;">255</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">255</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">255</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">0</span><span style="color: #00AA00;color: #439AD0;">&#41;</span> <span style="color: #933;"><span style="color: #cc66cc;color: #439AD0;">100</span>%</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">,</span> -moz-linear-gradient<span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #000000; font-weight: bold;color: #439AD0;">top</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc00cc;">#CCFF99</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc00cc;">#99CC66</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">background-image</span><span style="color: #00AA00;color: #439AD0;">:</span> -webkit-gradient<span style="color: #00AA00;color: #439AD0;">&#40;</span>radial<span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">100</span> <span style="color: #cc66cc;color: #439AD0;">100</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">32</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">118</span> <span style="color: #cc66cc;color: #439AD0;">118</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">15</span><span style="color: #00AA00;color: #439AD0;">,</span> from<span style="color: #00AA00;color: #439AD0;">&#40;</span>rgba<span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #cc66cc;color: #439AD0;">255</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">255</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">255</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">0</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">,</span> to<span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #cc00cc;">#ffffff</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">,</span> -webkit-gradient<span style="color: #00AA00;color: #439AD0;">&#40;</span>linear<span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #933;"><span style="color: #cc66cc;color: #439AD0;">0</span>%</span> <span style="color: #933;"><span style="color: #cc66cc;color: #439AD0;">0</span>%</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #933;"><span style="color: #cc66cc;color: #439AD0;">0</span>%</span> <span style="color: #933;"><span style="color: #cc66cc;color: #439AD0;">100</span>%</span><span style="color: #00AA00;color: #439AD0;">,</span> from<span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #cc00cc;">#CCFF99</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">,</span> to<span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #cc00cc;">#99CC66</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">;</span>
-pie-<span style="color: #000000; font-weight: bold;color: #439AD0;">background</span><span style="color: #00AA00;color: #439AD0;">:</span> linear-gradient<span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #000000; font-weight: bold;color: #439AD0;">top</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc00cc;">#CCFF99</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc00cc;">#99CC66</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span></pre></div></div>

<p>The glassy part adds the background gradients as well as white radial gradient at the top of the button. So I reduced it down to like 30 lines of CSS for a pretty cool button.There are a few things to note:</p>
<p>1) As stated before, you MUST use CSS Pie for this to work in IE.</p>
<p>2) Ignore the webkit radial gradient, because I didn&#8217;t figure out how to do it correctly. Webkit&#8217;s syntax is a pain in the ass, so I just didn&#8217;t get it working correctly. If anyone wants to get that part done and post it, that would be great.</p>
<p>3) For IE6 to work, the &#8216;a&#8217; tag MUST be positioned relative. The effects get blow away if you do not.</p>
<h3>Final thoughts on this little experiment</h3>
<p>The really cool part for me about doing this, is that I&#8217;ve used two things/techniques from my previous posts. I&#8217;m using CSS Pie, and using multiple box-shadows on an element, which I wrote about <a href="http://jc-designs.net/blog/2010/08/css3-just-when-you-thought-you-knew-it-all/" target="_blank">here</a>.</p>
<p>I really like taking other people&#8217;s code, and seeing if I can do it with less code. Granted, here I am leaving some things out, but the overall effect comes through. My Pez button still looks like candy, and it didn&#8217;t take a vast amount of CSS to work. Would I use this button myself rather than cut images? Actually, with it pre-made, yes. If it wasn&#8217;t, then no. It took me a while to get everything the way I wanted it, and you just can&#8217;t waste that much creating a single button. So in production, I would have Sliced &#8216;n&#8217; Diced an image. Now, if you had a library of pre-made, small weight budget CSS3 buttons, then I might start using these types of things more often. Maybe I&#8217;ll start one and throw it out for you guys.</p>
<p>Take the code above and have fun with it. If you come up with something better, let me know!</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=534" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2010/09/the-poor-mans-css3-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Positioning &#8211; Relative and Absolute</title>
		<link>http://jc-designs.net/blog/2010/09/css-positioning-relative-and-absolute/</link>
		<comments>http://jc-designs.net/blog/2010/09/css-positioning-relative-and-absolute/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 02:50:14 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=530</guid>
		<description><![CDATA[It takes all types
There are four types of positioning: static, fixed, relative, and absolute. Static is the default position state which means it isn&#8217;t positioned. It goes where it normally would on the page. Fixed is positioned relative to the browser window, and won&#8217;t move even if the window is scrolled. Relative positioning allows you [...]]]></description>
			<content:encoded><![CDATA[<h3>It takes all types</h3>
<p>There are four types of positioning: static, fixed, relative, and absolute. Static is the default position state which means it isn&#8217;t positioned. It goes where it normally would on the page. Fixed is positioned relative to the browser window, and won&#8217;t move even if the window is scrolled. Relative positioning allows you to use the top, right, bottom, and left CSS properties to position an element relative to where it would appear in the document. Absolute is the tricky one, because it is basically removed from the document, and placed EXACTLY where you want it to go.</p>
<h3>A note on :relative</h3>
<p>If you position something relative, and then use top and left to shift it over, don&#8217;t expect everything below it to shift as well. It still occupies the space in the document normally, you are just shifting it from its initial placement.</p>
<p><span id="more-530"></span></p>
<h3>Let&#8217;s take a look</h3>
<p><strong>View the following demos to get a clearer picture of what I am talking about</strong>.</p>
<p>When you position something absolute, you need to remember that it is removed from the flow of the document &#8211; everything else will ignore it. The element is positioned relative to the first parent element that has a position other than static, if there are none, it will use <html>. If that is the case, and you set the element&#8217;s top and left to 0, it will appear at the very top left edge of the window. No matter how you resize that window, that element will always be at the very top left. Take a look at what we would have.</p>
<p><a href="http://www.jc-designs.net/demo/position1.html">View Demo</a></p>
<p>Here is what the css looks like:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #cc00cc;">#one</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">width</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">966px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">background</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc00cc;">#999999</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">margin</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">40px</span> <span style="color: #993333;color: #439AD0;">auto</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#two</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">position</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">absolute</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">top</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc66cc;color: #439AD0;">0</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">left</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc66cc;color: #439AD0;">0</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">background</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc00cc;">#ff0000</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">width</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">height</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span></pre></div></div>

<h3>How to put it where you want it</h3>
<p>Let&#8217;s say though, that you want an element in a specific spot that shows exactly where you want it all the time. Easy. Position one of its parents to relative!</p>
<p><a href="http://www.jc-designs.net/demo/position2.html">View Demo</a></p>
<p>Here is what the css would look like:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #cc00cc;">#one</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">position</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">relative</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">width</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">966px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">background</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc00cc;">#999999</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">margin</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">40px</span> <span style="color: #993333;color: #439AD0;">auto</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#two</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">position</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">absolute</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">top</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">left</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">500px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">background</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc00cc;">#ff0000</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">width</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">height</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span></pre></div></div>

<p>All that was changed, was adding position: relative to div #one, and changing the top and left numbers to div 2. Change them to 0 using Firebug, and you will see that 0 means positioned at the top left of div #one now.</p>
<h3>One is never enough</h3>
<p>Ooohhhh&#8230;I get it, you can&#8217;t just have one. You want another div there positioned absolutely. AND&#8230;you want this new div to appear under the red one.</p>
<p><a href="http://www.jc-designs.net/demo/position3.html">View Demo</a></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #cc00cc;">#one</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">position</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">relative</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">width</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">966px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">background</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc00cc;">#999999</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">margin</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">40px</span> <span style="color: #993333;color: #439AD0;">auto</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#two</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">position</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">absolute</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">top</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">left</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">500px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">background</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc00cc;">#ff0000</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">width</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">height</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">z-index</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc66cc;color: #439AD0;">2</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#three</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">position</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">absolute</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">top</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">85px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">left</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">550px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">background</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc00cc;">#999900</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">width</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">height</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span></pre></div></div>

<p>All I changed there, aside from adding the styles for div #three, is add z-index to div #two. It doesn&#8217;t matter what order the absoluted divs are in, just what z-index they have. Whichever element has the higher z-index, will show on top.</p>
<h3>Closing thoughts</h3>
<p>CSS positioning is actually very easy. Once you know how to use them, figuring out why an element isn&#8217;t positioned the way you thought it would be, becomes a lot easier, too. I can&#8217;t think of a time where I have used :fixed, but :relative and :absolute are thrown around enough that it is a must to learn if you haven&#8217;t yet. Hopefully now, you get a more clear picture of what they do, and how to control them! Let me know if you have any questions.</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=530" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2010/09/css-positioning-relative-and-absolute/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 &#8211; Just When You Thought You Knew It All</title>
		<link>http://jc-designs.net/blog/2010/08/css3-just-when-you-thought-you-knew-it-all/</link>
		<comments>http://jc-designs.net/blog/2010/08/css3-just-when-you-thought-you-knew-it-all/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 03:09:30 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=520</guid>
		<description><![CDATA[You can do that?
So I read an article today that I thought was going to suck. Nope, I was wrong. While I knew most of it, there was one thing that popped out at me today. See? Learnin&#8217; all the time! CSS3 has some cool stuff that is easier to do than opening up Photoshop [...]]]></description>
			<content:encoded><![CDATA[<h3>You can do that?</h3>
<p>So I read an article today that I thought was going to suck. Nope, I was wrong. While I knew most of it, there was one thing that popped out at me today. See? Learnin&#8217; all the time! CSS3 has some cool stuff that is easier to do than opening up Photoshop and creating an image for it. If you got my tweet today, which most of my subscribers didn&#8217;t because you don&#8217;t follow me on twitter (<a href="http://twitter.com/jcDesig">FOLLOW ME!</a>), then you have an inkling of what I am talking about.</p>
<p><span id="more-520"></span><br />
Text-shadow is a really good addition to CSS, I use it on my titles and what-not, and with the use of blur on them, it creates a nice subtle effect. What I did NOT know, is that you can have multiple shadows on the text, adding more awesome to the already kick ass property. Let me show you what the styles look like.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #000000; font-weight: bold;color: #439AD0;">text-shadow</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">4px</span> <span style="color: #933;">-2px</span> <span style="color: #933;">11px</span> <span style="color: #cc00cc;">#0033FF</span><span style="color: #00AA00;color: #439AD0;">,</span>
	<span style="color: #933;">2px</span> <span style="color: #933;">-7px</span> <span style="color: #933;">10px</span> <span style="color: #cc00cc;">#00CCFF</span><span style="color: #00AA00;color: #439AD0;">,</span>
	<span style="color: #933;">5px</span> <span style="color: #933;">-8px</span> <span style="color: #933;">26px</span> <span style="color: #cc00cc;">#00CCCC</span><span style="color: #00AA00;color: #439AD0;">,</span>
	 <span style="color: #933;">4px</span> <span style="color: #933;">6px</span> <span style="color: #933;">9px</span> <span style="color: #cc00cc;">#999999</span><span style="color: #00AA00;color: #439AD0;">;</span></pre></div></div>

<p><a href="http://www.jc-designs.net/demo/shadow.html">VIEW DEMO</a></p>
<h3>Yep! You read that right, there are 4 shadows going on there</h3>
<p>Holy hell, 4 text-shadows thrown on to create, while not a stellar looking effect, a crazy looking block of text. You know what is even more nuts than that? Can you guess? GOOD JOB! You guys are smarter than I thought, and you are right. You can add as many text-shadows as you want on that thing, seperated by commas. Not only that, but you can do the same thing for box shadows.</p>
<p>This just proves that there is always something new to learn about the things you think are are good at. Obviously I won&#8217;t be using this type of effect all that much, but it altered my way of thinking about CSS3 a little. If I can do this&#8230;maybe I can do something else that I didn&#8217;t think of. </p>
<p>Any other CSS3 stuff you guys know that others might not? Let us know here!</p>
<p>Oh, and I styled the demo buttons finally. Always adding stuff here.</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
<div class="jBox">
<h2 class="jq">jQuery junkBox</h2>
<p><strong>(:only-child)</strong><br />
This selector will get elements that are the only child of its parent. Below will get all &#8216;p&#8217; tags that are the only child of their parents.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #439AD0; font-weight: bold;">$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'p:only-child'</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'highlight'</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span></pre></div></div>

</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=520" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2010/08/css3-just-when-you-thought-you-knew-it-all/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTML5 Boilerplate, Conditional Comments, and things to come</title>
		<link>http://jc-designs.net/blog/2010/08/html5-boilerplate-conditional-comments-and-things-to-come/</link>
		<comments>http://jc-designs.net/blog/2010/08/html5-boilerplate-conditional-comments-and-things-to-come/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 04:05:44 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Machine Updates]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=506</guid>
		<description><![CDATA[The boiler room
If you haven&#8217;t at least heard of the HTML5 Boilerplate template, then you live in a dark cave as a hermit and are still using Photoshop 3. If you have, but haven&#8217;t checked it out, then you 100% need to. I downloaded the files (it comes with a few) and looked through it. [...]]]></description>
			<content:encoded><![CDATA[<h3>The boiler room</h3>
<p>If you haven&#8217;t at least heard of the <a href="http://html5boilerplate.com/">HTML5 Boilerplate</a> template, then you live in a dark cave as a hermit and are still using Photoshop 3. If you have, but haven&#8217;t checked it out, then you 100% need to. I downloaded the files (it comes with a few) and looked through it. Thank the gods it is commented so well, because there are a few things that I didn&#8217;t know going on.</p>
<p>It is an HTML 5 starting template loaded to the teeth with everything you could need&#8230;and then some. Just some of the things in it are: script tags to jQuery 1.4.2 (hosted on Google), Modernizer 1.5 js (see comment below by Paul Irish clearing things up for me on this), Google analytics code, Meyer&#8217;s reset CSS, conditional comments&#8230;this thing is PACKED with awesome.</p>
<p><span id="more-506"></span><br />
Personally I&#8217;m going to remove some things, because I don&#8217;t need them, which is perfectly fine because this file is delete friendly. What I am going to add is <a href="http://css3pie.com/">CSS PIE</a>. But that is the brilliance of it. It&#8217;s a great starting point, and you can do what you want with it. So go download it!</p>
<h3>Conditional Commenting Genius</h3>
<p>Forget about using conditional stylesheets now. Use <a href="http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/">this</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #339933;color: #439AD0;">&lt;!--</span><span style="color: #009900;color: #439AD0;">&#91;</span><span style="color: #000066; font-weight: bold;color: #439AD0;">if</span> lt IE <span style="color: #CC0000;color: #439AD0;">7</span> <span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">&gt;</span> <span style="color: #339933;color: #439AD0;">&lt;</span>body <span style="color: #003366; font-weight: bold;color: #439AD0;">class</span><span style="color: #339933;color: #439AD0;">=</span><span style="color: #3366CC;color: #439AD0;">&quot;ie6&quot;</span><span style="color: #339933;color: #439AD0;">&gt;</span> <span style="color: #339933;color: #439AD0;">&lt;!</span><span style="color: #009900;color: #439AD0;">&#91;</span>endif<span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">--&gt;</span>
<span style="color: #339933;color: #439AD0;">&lt;!--</span><span style="color: #009900;color: #439AD0;">&#91;</span><span style="color: #000066; font-weight: bold;color: #439AD0;">if</span> IE <span style="color: #CC0000;color: #439AD0;">7</span> <span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">&gt;</span>    <span style="color: #339933;color: #439AD0;">&lt;</span>body <span style="color: #003366; font-weight: bold;color: #439AD0;">class</span><span style="color: #339933;color: #439AD0;">=</span><span style="color: #3366CC;color: #439AD0;">&quot;ie7&quot;</span><span style="color: #339933;color: #439AD0;">&gt;</span> <span style="color: #339933;color: #439AD0;">&lt;!</span><span style="color: #009900;color: #439AD0;">&#91;</span>endif<span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">--&gt;</span>
<span style="color: #339933;color: #439AD0;">&lt;!--</span><span style="color: #009900;color: #439AD0;">&#91;</span><span style="color: #000066; font-weight: bold;color: #439AD0;">if</span> IE <span style="color: #CC0000;color: #439AD0;">8</span> <span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">&gt;</span>    <span style="color: #339933;color: #439AD0;">&lt;</span>body <span style="color: #003366; font-weight: bold;color: #439AD0;">class</span><span style="color: #339933;color: #439AD0;">=</span><span style="color: #3366CC;color: #439AD0;">&quot;ie8&quot;</span><span style="color: #339933;color: #439AD0;">&gt;</span> <span style="color: #339933;color: #439AD0;">&lt;!</span><span style="color: #009900;color: #439AD0;">&#91;</span>endif<span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">--&gt;</span>
<span style="color: #339933;color: #439AD0;">&lt;!--</span><span style="color: #009900;color: #439AD0;">&#91;</span><span style="color: #000066; font-weight: bold;color: #439AD0;">if</span> IE <span style="color: #CC0000;color: #439AD0;">9</span> <span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">&gt;</span>    <span style="color: #339933;color: #439AD0;">&lt;</span>body <span style="color: #003366; font-weight: bold;color: #439AD0;">class</span><span style="color: #339933;color: #439AD0;">=</span><span style="color: #3366CC;color: #439AD0;">&quot;ie9&quot;</span><span style="color: #339933;color: #439AD0;">&gt;</span> <span style="color: #339933;color: #439AD0;">&lt;!</span><span style="color: #009900;color: #439AD0;">&#91;</span>endif<span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">--&gt;</span>
<span style="color: #339933;color: #439AD0;">&lt;!--</span><span style="color: #009900;color: #439AD0;">&#91;</span><span style="color: #000066; font-weight: bold;color: #439AD0;">if</span> gt IE <span style="color: #CC0000;color: #439AD0;">9</span><span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">&gt;</span>  <span style="color: #339933;color: #439AD0;">&lt;</span>body<span style="color: #339933;color: #439AD0;">&gt;</span>             <span style="color: #339933;color: #439AD0;">&lt;!</span><span style="color: #009900;color: #439AD0;">&#91;</span>endif<span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">--&gt;</span>
<span style="color: #339933;color: #439AD0;">&lt;!--</span><span style="color: #009900;color: #439AD0;">&#91;</span><span style="color: #000066; font-weight: bold;color: #439AD0;">if</span> <span style="color: #339933;color: #439AD0;">!</span>IE<span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">&gt;&lt;!--&gt;</span> <span style="color: #339933;color: #439AD0;">&lt;</span>body<span style="color: #339933;color: #439AD0;">&gt;</span>         <span style="color: #339933;color: #439AD0;">&lt;!--&lt;!</span><span style="color: #009900;color: #439AD0;">&#91;</span>endif<span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">--&gt;</span></pre></div></div>

<p>This is great, because now you don&#8217;t need the extra CSS files for IE problems, and you don&#8217;t need to use hacks. For example, let&#8217;s say you have margin or something that is going bad in IE6. If the browser detected is IE6, then it puts the class &#8220;ie6&#8243; onto the body. You would then write the CSS like this:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #cc00cc;">#myContainer</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">margin</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">20px</span> <span style="color: #933;">20px</span> <span style="color: #cc66cc;color: #439AD0;">0</span> <span style="color: #933;">10px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span>
<span style="color: #6666ff;color: #439AD0;">.ie6</span> <span style="color: #cc00cc;">#myContainer</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
<span style="color: #000000; font-weight: bold;color: #439AD0;">margin</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">20px</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;color: #439AD0;">0</span> <span style="color: #933;">5px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span></pre></div></div>

<p>Easy? YES. And awesome. Not much else to say about it other than start using this instead of whatever else you were doing, because this was better.</p>
<h3>Things to come at The Web Machine</h3>
<p>Well, as you may know from previous posts, I&#8217;m starting to learn how to theme Magento, which will come in handy, because I will be selling HTML/WordPress templates. Unique, not templates. Meaning only 1 of each will be sold. If you buy it, no one else will have it. Along with that I plan on writing more on Magento, maybe my own tutorial on how to theme it, or whatever strikes my fancy. Plus I am starting to FINALLY learn PHP, so I plan on throwing some articles on that here as well. More things to write about, so stay tuned folks!</p>
<p>What are you guys learning? Let me know!</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=506" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2010/08/html5-boilerplate-conditional-comments-and-things-to-come/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IE6&#8217;s hasLayout and its margin issue</title>
		<link>http://jc-designs.net/blog/2010/08/ie6s-haslayout-and-its-margin-issue/</link>
		<comments>http://jc-designs.net/blog/2010/08/ie6s-haslayout-and-its-margin-issue/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 02:28:55 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[ie6]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=488</guid>
		<description><![CDATA[IE6 has bugs&#8230;let&#8217;s kill them
Everyone know how to fix the the double margin IE6 puts on an element that has a left/right margin on it, without using a hack? If not, it&#8217;s an easy one&#8230;set display to inline. That&#8217;s all it takes. Have you ever run into the 3px margin gap though? This took some [...]]]></description>
			<content:encoded><![CDATA[<h3>IE6 has bugs&#8230;let&#8217;s kill them</h3>
<p>Everyone know how to fix the the double margin IE6 puts on an element that has a left/right margin on it, without using a hack? If not, it&#8217;s an easy one&#8230;set display to inline. That&#8217;s all it takes. Have you ever run into the 3px margin gap though? This took some hunting for me to find out how to fix it. If you have any idea of what I&#8217;m talking about, you will know how infuriating it is. A co-worker and I ran into this problem months ago, figured out how to fix it, and forgot about it. The problem came back, and we drew a blank. Basically, we are using a component that says &#8220;Hey, if a flash banner is present, use it, otherwise, use this image over here instead.&#8221; Well, when it puts the image in, it doesn&#8217;t give it a height or a width. Why would that be a problem? Because it doesn&#8217;t have &#8216;Layout&#8217; according to IE.</p>
<h3>What does &#8216;hasLayout&#8217; mean?</h3>
<p>I&#8217;ll give you the definition that I got from <a href="http://www.satzansatz.de/cssd/onhavinglayout.html">here</a>: <em>“Layout” is an IE/Win proprietary concept that determines how elements draw and bound their content&#8230;&#8221;</em>.</p>
<p>I would like to be able to explain why this happens, but the link above does a better job of it than I ever could. I just want you aware of what happens. To better illustrate this, take a look at the link below in IE6.</p>
<p><a href="http://www.jc-designs.net/demo/hasLayout.html" target="_blank">Click here</a> for demo (again, look at it in IE6 &#8211; you won&#8217;t see it in any other browser).</p>
<p><span id="more-488"></span></p>
<p>I&#8217;ve read now a bunch of very bad ways to fix this, like using a negative top margin to move the bottom div up. Pure dumb, because there is an easy way to fix this. I&#8217;ve used zoom set to 1 before, but that doesn&#8217;t validate, so if you are one of the purest, this isn&#8217;t an option. Plus, this won&#8217;t work on this anyway. Real easy way to fix it. Give the image itself a display of block. Pure easy right? Now, I know most of you are not going to run into this problem, or maybe you just don&#8217;t care. I&#8217;m just demonstrating this so you are aware of it, and know how to fix it. It took me a while to figure out it had to be put on the image itself, and not the containing div. When using Spoon for Firefox, IE Developer kept showing text nodes underneath the image, so I was looking for a way to get rid of that. After about an hour of fiddling and trying everything I finally got it. And so do you now!</p>
<p>Let me know if you have come across any wierd IE bugs! I am always looking for stuff like that and how to fix them.</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
<div class="jBox">
<h2 class="jq">jQuery junkBox</h2>
<p><strong>$(&#8216;*&#8217;)</strong><br />
This will return all elements in the document, which I can&#8217;t think of a reason to do such a thing. But I can think of a reason to use this for something good. Below it change all the children of the element with an id of &#8216;container&#8217;, and give them the css property of color, set to black.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #439AD0; font-weight: bold;">$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'#container &gt; *'</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'color'</span><span style="color: #339933;color: #439AD0;">,</span> <span style="color: #3366CC;color: #439AD0;">'#000000'</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span></pre></div></div>

</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=488" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2010/08/ie6s-haslayout-and-its-margin-issue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS Wish List &#8211; Div Shapes</title>
		<link>http://jc-designs.net/blog/2010/08/css-wish-list-plotting-div-points/</link>
		<comments>http://jc-designs.net/blog/2010/08/css-wish-list-plotting-div-points/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 03:23:57 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=474</guid>
		<description><![CDATA[Effects are cool, but come on, it could do more
Note: Comments have been disabled on this article due to an INSANE amount of spam ping comments. Must have been my title or something.
We can all agree that CSS3 added some really cool stuff. Linear gradients alone made it worthwhile for me. Add in border-radius, box/text-shadow, [...]]]></description>
			<content:encoded><![CDATA[<h3>Effects are cool, but come on, it could do more</h3>
<p><strong>Note: Comments have been disabled on this article due to an INSANE amount of spam ping comments. Must have been my title or something.</strong></p>
<p>We can all agree that CSS3 added some really cool stuff. Linear gradients alone made it worthwhile for me. Add in border-radius, box/text-shadow, transitions (available in FF 4 if you didn&#8217;t know yet) and whatever else I&#8217;m forgetting to mention, and you have a pretty good upgrade to CSS. Today though, while working on a site, I was frustrated by something that CSS can&#8217;t do. I Google&#8217;d the hell out of it, and I couldn&#8217;t even get the right topic to come up. It made me stop and think that, ya all those cool effects are great, but there are some things I would like it to do beyond that.</p>
<h3>Plotting Div Points</h3>
<p>I didn&#8217;t think of it until today. I work within a custom content management system that feeds default content into specific sections on the site. I want the main content block, I call a specific &#8216;id&#8217; on a div, and boom, it throws in some default content pertaining to whatever market I am building for. The problem though, is I can&#8217;t put a div/image/whatever into that content block, until after the site is ordered. Not a problem if I am building a custom site, because I have the ability to change that content. If I am building a template site though, I don&#8217;t have that ability because it has to fit any number of clients. What I needed today, was to wrap text around another div. See the image below and you will see what I mean.</p>
<div class="center">
<img src="http://www.jc-designs.net/newimages/blogImages/cssDemands.jpg" alt="CSS Demands image" />
</div>
<p>NOTE: I think I am going to build this and sell the template here, so if you are interested, contact me!</p>
<p><span id="more-474"></span><br />
Easy stuff normally right? I&#8217;d put the div in the content wrapper, and float it right, then everything wraps around it. Done. Not in my case though, where I can&#8217;t inject further code into the default content. What I WANT CSS to be able to do, is allow me to plot the points of a div. In other words, I want to be able to control the shape of the div. The picture below shows what I want the div to look like.</p>
<div class="center">
<img src="http://www.jc-designs.net/newimages/blogImages/cssDemands2.jpg" alt="CSS Demands image 2" />
</div>
<h3>What would the CSS look like?</h3>
<p>Now that you see the basic shape I was looking for, what would the CSS look like for something like that? Well, here is a crack at that:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #6666ff;color: #439AD0;">.mainContent</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
border-points<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #cc66cc;color: #439AD0;">0</span> <span style="color: #cc66cc;color: #439AD0;">0</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">0</span> <span style="color: #cc66cc;color: #439AD0;">200</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">200</span> <span style="color: #cc66cc;color: #439AD0;">200</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">200</span> <span style="color: #cc66cc;color: #439AD0;">400</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">400</span> <span style="color: #cc66cc;color: #439AD0;">400</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">400</span> <span style="color: #cc66cc;color: #439AD0;">0</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">0</span> <span style="color: #cc66cc;color: #439AD0;">0</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span></pre></div></div>

<p>What would all that mean though? Each two number set would plot a point for the div, so if you always start at the top left most corner, (top: 0, left: 0) you would tell the CSS where to plot each following points. In this case, the second point would be at 0px from the top, and 200 left of the starting point. The next would be 200 from the top, and 200 left. Then 200 from the top, and 400 left. And so forth until you completed the div again at 0 0.</p>
<p>But what if you wanted a circle?</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #6666ff;color: #439AD0;">.mainContent</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
shape<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">circle</span><span style="color: #00AA00;color: #439AD0;">;</span>
shape-<span style="color: #000000; font-weight: bold;color: #439AD0;">size</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span></pre></div></div>

<h3>Where is my flying car?</h3>
<p>Obviously I&#8217;m coming up with the ridiculous CSS crap off the top of my head, but I think you understand what I am talking about. To me this is like the question &#8220;Why don&#8217;t we have flying cars yet?&#8221; CSS has been around a while, I would think it should be able to do some things like this. I don&#8217;t think it would cause to many issues with layout, that floats and proper math couldn&#8217;t handle. Now that you have read this, what do you think? Am I insane for expecting or wanting such a thing? Can you see a use for it? Seriously, imagine getting HTML text to wrap inside a circle or triangle shape? Some cool stuff could be done. </p>
<p>Do you have any CSS wish list items? Let me know, or tell me my idea is good or crap. Let&#8217;s talk!</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
<div class="jBox">
<h2 class="jq">jQuery junkBox</h2>
<p><strong>.innerHeight();</strong><br />
This method will get the height for the <strong>first</strong> element in the set of matched elements (including padding, but NOT border). Below it would get the first div&#8217;s height in all that was matched (so height+padding = height returned).</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #439AD0; font-weight: bold;">$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'.myClass div'</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">innerHeight</span><span style="color: #339933;color: #439AD0;">;</span></pre></div></div>

</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=474" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2010/08/css-wish-list-plotting-div-points/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS PIE: CSS3 styles for IE &#8211; easy to use and awesome</title>
		<link>http://jc-designs.net/blog/2010/08/css-pie-css3-styles-for-ie/</link>
		<comments>http://jc-designs.net/blog/2010/08/css-pie-css3-styles-for-ie/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 03:24:31 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=470</guid>
		<description><![CDATA[Flash back to&#8230;
A little while back I wrote an article about getting border-radius working in IE. Well, if you haven&#8217;t been keeping up in the blogging world, I came across CSS PIE. It basically does the same thing, only more. If you use things like box-shadow, linear-gradients, AND border-radius, then this is the version you [...]]]></description>
			<content:encoded><![CDATA[<h3>Flash back to&#8230;</h3>
<p>A little while back I wrote an article about <a href="http://jc-designs.net/blog/2010/07/getting-border-radius-to-work-in-ie/" target="_blank">getting border-radius working in IE</a>. Well, if you haven&#8217;t been keeping up in the blogging world, I came across CSS PIE. It basically does the same thing, only more. If you use things like box-shadow, linear-gradients, AND border-radius, then this is the version you will want to use. Basically the same call in the css file:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #6666ff;color: #439AD0;">.myClass</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
-moz-border-radius<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;color: #439AD0;">;</span>
-webkit-border-radius<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;color: #439AD0;">;</span>
border-radius<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;color: #439AD0;">;</span>
-moz-box-shadow<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;color: #439AD0;">;</span>
-webkit-box-shadow<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;color: #439AD0;">;</span>
box-shadow<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">2px</span> <span style="color: #933;">2px</span> <span style="color: #933;">5px</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;color: #439AD0;">;</span>
behavior<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #993333;color: #439AD0;">url</span><span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #ff0000; font-style: italic;">/PIE.htc</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span></pre></div></div>

<p><span id="more-470"></span></p>
<p>The last line there is the obvious call to the htc file you have to download, which you can get <a href="http://github.com/lojjic/PIE/downloads">here</a>.</p>
<p><strong>A couple things to note:</strong><br />
1) Again, like the other one I talked about, the htc file is relative to the html file, NOT the css file. So either make it absolute from the domain root, OR, relative to the html file.<br />
2) There are issues with static positioning and background images, which you can also read about <a href="http://css3pie.com/documentation/known-issues/">here</a> (I had to find this out the hard way with the other version I used). Easy solution is to make the target have position set to relative.</p>
<p>Other than that, this works like a charm. Works on IE6-8. </p>
<h3>Conclusion</h3>
<p>Usually I am not so into these types of things because you have to add a script to make it work. Not so here, and I see no reason for not implementing this in all of my projects. All you have to do is upload the file to your server, and you are done. Well other than making all the behavior calls to it in the CSS file.</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
<div class="jBox">
<h2 class="jq">jQuery junkBox</h2>
<p><strong>$.merge();</strong><br />
This will merge the contents of two arrays together into the first array. So below, the two variables will be merged together, but uses a copy, so the original isn&#8217;t altered. You will get: ['Rocky', 'Better Off Dead', 'The Last Samurai', 'Goonies', 'Hangover', '40 Year Old Virgin']</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #003366; font-weight: bold;color: #439AD0;">var</span> myMovies1 <span style="color: #339933;color: #439AD0;">=</span> <span style="color: #009900;color: #439AD0;">&#91;</span><span style="color: #3366CC;color: #439AD0;">'Rocky'</span><span style="color: #339933;color: #439AD0;">,</span><span style="color: #3366CC;color: #439AD0;">'Better Off Dead'</span><span style="color: #339933;color: #439AD0;">,</span><span style="color: #3366CC;color: #439AD0;">'The Last Samurai'</span><span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">;</span>
<span style="color: #003366; font-weight: bold;color: #439AD0;">var</span> myMovies2 <span style="color: #339933;color: #439AD0;">=</span> <span style="color: #009900;color: #439AD0;">&#91;</span><span style="color: #3366CC;color: #439AD0;">'Goonies'</span><span style="color: #339933;color: #439AD0;">,</span><span style="color: #3366CC;color: #439AD0;">'Hangover'</span><span style="color: #339933;color: #439AD0;">,</span><span style="color: #3366CC;color: #439AD0;">'40 Year Old Virgin'</span><span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">;</span>
$.<span style="color: #660066;">merge</span><span style="color: #009900;color: #439AD0;">&#40;</span> $.<span style="color: #660066;">merge</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #009900;color: #439AD0;">&#91;</span><span style="color: #009900;color: #439AD0;">&#93;</span><span style="color: #339933;color: #439AD0;">,</span>myMovies1<span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">,</span> myMovies2<span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span></pre></div></div>

</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=470" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2010/08/css-pie-css3-styles-for-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting border-radius to work in IE</title>
		<link>http://jc-designs.net/blog/2010/07/getting-border-radius-to-work-in-ie/</link>
		<comments>http://jc-designs.net/blog/2010/07/getting-border-radius-to-work-in-ie/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 07:37:02 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=450</guid>
		<description><![CDATA[Border-radius on IE? That is just crazy!
It&#8217;s funny how many things from my job come up as posts. Well, I guess not funny, because I end up working on things that I am not familiar with and have to fix. Which is the case tonight. I&#8217;m not sure if you have read any articles, but [...]]]></description>
			<content:encoded><![CDATA[<h3>Border-radius on IE? That is just crazy!</h3>
<p>It&#8217;s funny how many things from my job come up as posts. Well, I guess not funny, because I end up working on things that I am not familiar with and have to fix. Which is the case tonight. I&#8217;m not sure if you have read any articles, but there are plenty, about getting the CSS3 property border-radius to work in IE. It is actually rather easy, so let&#8217;s get to it, and I&#8217;ll show you how!<br />
Actually, I&#8217;ll tell you how. And then I&#8217;ll tell you some of the troubles I ran into.</p>
<h3>Wait, that&#8217;s it?</h3>
<p>So getting your rounded corners is pretty damn easy. There are three things you have to do:</p>
<p>1) Go <a href="http://www.htmlremix.com/css/curved-corner-border-radius-cross-browser">here</a> and download the htc file.<br />
2) Place the downloaded file in your images folder<br />
3) In your CSS file, on the style that you want the rounded corners you add something like this:</p>
<p><span id="more-450"></span></p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #6666ff;color: #439AD0;">.roundedClass</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
-moz-border-radius<span style="color: #00AA00;color: #439AD0;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;color: #439AD0;">;</span>
-webkit-border-radius<span style="color: #00AA00;color: #439AD0;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;color: #439AD0;">;</span>
behavior<span style="color: #00AA00;color: #439AD0;">:</span><span style="color: #993333;color: #439AD0;">url</span><span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/border-radius.htc</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span></pre></div></div>

<p>This being the important part:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;color: #439AD0; font-weight: bold;">behavior<span style="color: #00AA00;color: #439AD0;">:</span><span style="color: #993333;color: #439AD0;">url</span><span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/border-radius.htc</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">;</span></pre></div></div>

<p>Where ever you are using the border-radius properties, you want the behavior added as well. Note that this does not work at all on anything in a form. So inputs, buttons, whatever&#8230;if it is in a form, I could not get this damn thing to work. Also, make the path in the behavior line relative to the document NOT the CSS file. Got it? If for instance, the .htc file is in the images folder and you are dealing with a root level document, then it would be images/border-radius.htc. If you have any questions about this, post a question in the comments section.</p>
<h3>IE8 is not very nice &#8211; pay attention here!</h3>
<p>I learned something while doing this. IE8.0.6 and IE8.0.76 handle this differently. First, the element with this property on it should be positioned to relative. If you have text on top of it, then that will have to be wrapped in something and also positioned relative. Example:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;div class=&quot;roundedClass&quot;&gt;&lt;p class=&quot;textClass&quot;&gt;This is the text that goes on top of the rounded corners div&lt;/p&gt;&lt;/div&gt;</pre></div></div>

<p>If you did this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;color: #439AD0; font-weight: bold;">&lt;div class=&quot;roundedClass&quot;&gt;This is the text that goes on top of the rounded corners div&lt;/div&gt;</pre></div></div>

<p>Then IE8.0.76 doesn&#8217;t play nice. IE8.06 however will work fine. I have NO idea why, but that is how it is.</p>
<h3>To conclude</h3>
<p>Have two wrappers (elements)&#8230;both positioned relative, the outer has the behavior and border-radius properties. Piece of cake. This works in IE6-8, and once I figured out the two wrappers and position relative thing, everything worked beautifully. Again, if you are still confused, ask away!</p>
<p>I will leave you with a quick tip. If you have multiple tabs open in IE8, press ctrl+q. It will show all the tabs you have open in one window, which you can then pick the one you want to view. Works kind of like Apple&#8217;s Expose. I wish I had known that a while back. It is actually a feature that they should have been promoting more. Especially considering that FF4 will have this feature now as well.</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
<div class="jBox">
<h2 class="jq">jQuery junkBox</h2>
<p><strong>.detach();</strong><br />
This method will remove the matched elements from the DOM. Works kind of like .remove(), only that it keeps all the data associated with the removed elements in case you want to reinsert them back in later. So below would remove the unordered list from the element with an id of &#8216;wrapper&#8217;.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #439AD0; font-weight: bold;">$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'#wrapper'</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">detach</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'ul'</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span></pre></div></div>

</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=450" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2010/07/getting-border-radius-to-work-in-ie/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to control CSS3 Radial Gradients</title>
		<link>http://jc-designs.net/blog/2010/07/how-to-control-css3-radial-gradients/</link>
		<comments>http://jc-designs.net/blog/2010/07/how-to-control-css3-radial-gradients/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 07:04:15 +0000</pubDate>
		<dc:creator>jcDesigns</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://jc-designs.net/blog/?p=401</guid>
		<description><![CDATA[Finally, something not so outrageous using CSS3 that we can all understand
I got a link through twitter about a raindrop done using CSS (don&#8217;t bother looking at this in Safari or Chrome, because he write the additional CSS for that). Normally this is the kind of thing that I will look at and say cool, [...]]]></description>
			<content:encoded><![CDATA[<h3>Finally, something not so outrageous using CSS3 that we can all understand</h3>
<p>I got a link through twitter about a <a href="http://mozilla.seanmartell.com/raindrop/">raindrop</a> done using CSS (don&#8217;t bother looking at this in Safari or Chrome, because he write the additional CSS for that). Normally this is the kind of thing that I will look at and say cool, but waste of time. This one caught my eye though because it is actually pretty simple. I&#8217;m not going to recreate the damn thing, but all it is, is a bunch of divs and a surprisingly small amount of CSS. I was actually impressed with this one, and I think it could have been done with just an ul and list items. Now, I would still use an image in a real life situation, but I picked this piece because I did not really know how to use the new gradients. This guy obviously does.</p>
<h3>Learnin&#8217;</h3>
<p>That led me to do some small bit of research and tests, and found it is not all that hard, just slightly confusing to get a grasp of what the numbers do. On top of that, the CSS Safari uses to do radial gradients is pretty different.</p>
<p>Some things to note about Safari while doing my demo. I could not get it to recognize percentages for the values in the border radius, so I had to do pixels. I&#8217;m not sure it can or not, and I didn&#8217;t find anything about it. Safari 5 does not <em>need</em> -webkit- in front of border-radius &#8211; it will still use it, so I would include it anyway to support the older versions. </p>
<p>If you look at the demo, you can see a div with a basic radial gradient, with rounded corners set to 100% in FF, and 300px in Safari. This should appear as a circle with red in the middle, then orange fading out to yellow. The second, is just to show you something easy to do with it. It is a png with the word GRADIENT cut out of it, and a drop shadow layer style put on. It then has a div behind it with a radial gradient, which if you ever wanted to change the colors, you wouldn&#8217;t have to use photoshop to do it. Just change the CSS!</p>
<p><a href="http://www.jc-designs.net/demo/radial.html" target="_blank">Click here for demo</a>.</p>
<p><span id="more-401"></span></p>
<h3>So how do you do it already?</h3>
<p>It took me a while to understand what all of the numbers meant, and how to move the gradient around. Using the image below, I&#8217;ll explain what each does in plain English. After reading it, the best way to really get a grasp of it is to mess with it in Firebug, adjusting the numbers.</p>
<p><img src="http://www.jc-designs.net/newimages/grad2.jpg" alt="Gradient CSS image" /></p>
<p><strong>Firefox:</strong><br />
A: This number, as it goes down, moves the center of the gradient left/right, while shrinking/increasing the amount of the center color displayed.<br />
B: Same as A, only top/bottom<br />
C: Adjusts the angle of the gradient, but in circle shape, this doesn&#8217;t do anything<br />
D: Shape of the gradient &#8211; This can be circle or ellipse<br />
E: Size of the gradient. This is like PS, where you can start and end your gradient at any point. This can be set to: closest-side, closest-corner, farthest-side, farthest-corner, contain (same as closest-side), and cover(same as farthest-corner)<br />
F: This is the center color of the gradient<br />
G: The color stop position &#8211; can be from 0 &#8211; 100%</p>
<p><strong>Safari:</strong><br />
A: This sets what type of gradient: linear or radial<br />
B: Moves the gradient left/right and top/bottom while keeping the center of the gradient in the middle (will look like a cone if you move the numbers far enough<br />
C: How much you are fading in or out the center color<br />
D: Moves the center of the gradient left/right and top/bottom while keeping the gradient in the middle<br />
E: How much of the center color that is solid (not faded out) &#8211; mess with this and you will see some cool stuff!<br />
F: The outer color<br />
G: The center color<br />
H: Think of this as the color between the outer and inner colors, and its percentage to show. Note you can do a very smooth gradient without F &#038; G, and only use a bunch of color-stops.</p>
<p>Here is the CSS I used for the circle:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;color: #439AD0; font-weight: bold;"><span style="color: #cc00cc;">#container</span> <span style="color: #00AA00;color: #439AD0;">&#123;</span>
	-moz-border-radius<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;"><span style="color: #cc66cc;color: #439AD0;">100</span>%</span><span style="color: #00AA00;color: #439AD0;">;</span>
	border-radius<span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">300px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">width</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">300px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">height</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">300px</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">margin</span><span style="color: #00AA00;color: #439AD0;">:</span> <span style="color: #933;">50px</span> <span style="color: #993333;color: #439AD0;">auto</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">background</span><span style="color: #00AA00;color: #439AD0;">:</span> 
		-moz-radial-gradient<span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #933;">150px</span> <span style="color: #933;">150px</span> 0deg<span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #993333;color: #439AD0;">circle</span> closest-side<span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc00cc;">#ff0000</span> <span style="color: #933;"><span style="color: #cc66cc;color: #439AD0;">0</span>%</span><span style="color: #00AA00;color: #439AD0;">,</span> orange <span style="color: #933;"><span style="color: #cc66cc;color: #439AD0;">50</span>%</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #993333;color: #439AD0;">yellow</span> <span style="color: #933;"><span style="color: #cc66cc;color: #439AD0;">100</span>%</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">;</span>
	<span style="color: #000000; font-weight: bold;color: #439AD0;">background</span><span style="color: #00AA00;color: #439AD0;">:</span> 
		-webkit-gradient<span style="color: #00AA00;color: #439AD0;">&#40;</span>radial<span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">150</span> <span style="color: #cc66cc;color: #439AD0;">150</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">100</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">150</span> <span style="color: #cc66cc;color: #439AD0;">150</span><span style="color: #00AA00;color: #439AD0;">,</span> <span style="color: #cc66cc;color: #439AD0;">40</span><span style="color: #00AA00;color: #439AD0;">,</span> from<span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #993333;color: #439AD0;">yellow</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">,</span> to<span style="color: #00AA00;color: #439AD0;">&#40;</span><span style="color: #993333;color: #439AD0;">red</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">,</span> color-stop<span style="color: #00AA00;color: #439AD0;">&#40;</span>.4<span style="color: #00AA00;color: #439AD0;">,</span>orange<span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">&#41;</span><span style="color: #00AA00;color: #439AD0;">;</span>
<span style="color: #00AA00;color: #439AD0;">&#125;</span></pre></div></div>

<p>Take a look at the demo, copy the HTML and CSS, and start messing around. Once you start fiddling with it, everything will start to make sense. Hopefully my image and little lists helped you to understand CSS3 radial gradients better, and you get a clearer picture on controlling them. Now you can go and do some experimenting and come up with more raindrops.</p>
<div class="gator">
<a  href="http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=jcDesigns-"><img src="http://tracking.hostgator.com/img/Shared/468x60.gif" border=0></a></p>
<p>Coupon Code: webmachine</p>
</div>
<div class="jBox">
<h2 class="jq">jQuery junkBox</h2>
<p><strong>.live();</strong><br />
This method attaches a handler to the event for every element that matches what you are searching for &#8211; currently or any added after the fact (which bind() does not do). Below, live() attaches a click event to anything with the class &#8216;touchThis&#8217;, including anything added later to the DOM with the same class.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;color: #439AD0; font-weight: bold;">$<span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'.touchThis'</span><span style="color: #009900;color: #439AD0;">&#41;</span>.<span style="color: #660066;">live</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'click'</span><span style="color: #339933;color: #439AD0;">,</span> <span style="color: #003366; font-weight: bold;color: #439AD0;">function</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #009900;color: #439AD0;">&#41;</span> <span style="color: #009900;color: #439AD0;">&#123;</span>
<span style="color: #000066;color: #439AD0;">alert</span><span style="color: #009900;color: #439AD0;">&#40;</span><span style="color: #3366CC;color: #439AD0;">'You totally just touched that!'</span><span style="color: #009900;color: #439AD0;">&#41;</span><span style="color: #339933;color: #439AD0;">;</span>
<span style="color: #009900;color: #439AD0;">&#125;</span></pre></div></div>

</div>
 <img src="http://jc-designs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=401" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://jc-designs.net/blog/2010/07/how-to-control-css3-radial-gradients/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
