<?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>web enavu &#187; CSS</title>
	<atom:link href="http://web.enavu.com/category/design/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://web.enavu.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Thu, 05 May 2011 01:00:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mock Design Slice HTML CSS JavaScript &#8211; Modern Approach to Creating Websites</title>
		<link>http://web.enavu.com/daily-tip/mock-design-slice-html-css-javascript-modern-approach-to-creating-websites/</link>
		<comments>http://web.enavu.com/daily-tip/mock-design-slice-html-css-javascript-modern-approach-to-creating-websites/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 15:47:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DESIGN]]></category>
		<category><![CDATA[Daily Tip]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://web.enavu.com/?p=1876</guid>
		<description><![CDATA[The optimal process I have developed after creating thousands of websites, if you follow my pattern and understand the reasoning behind it you can be making websites two to three times faster!]]></description>
			<content:encoded><![CDATA[<p>The optimal process I have developed after creating thousands of websites, if you follow my pattern and understand the reasoning behind it you can be making websites two to three times faster!<span id="more-1876"></span></p>
<h2 style="margin-bottom:4px;">My Designer Shades Have Cookie Jars</h2>
<h3><span style="color: #a4a4a4;"><em>(Mock Design Slice HTML CSS JavaScript/JQuery)</em></span></h3>
<p>Okay the acronym MDSHCJ might be hard to remember, but <strong>My Designer Shades Have Cookie Jars</strong> is pretty darn catchy. As you can see in the title this stands for Mock Design Slice HTML CSS and JavaScript/JQuery. Let&#8217;s get started, I will go over each part of this development process so you can get an idea of how it all works and how it can help you make websites faster.</p>
<h2>Mock Up</h2>
<p><a href="http://web.enavu.com/wp-content/uploads/m.jpg"><img class="alignnone size-full wp-image-1882" title="m" src="http://web.enavu.com/wp-content/uploads/m.jpg" alt="Mock Up" width="400" height="95" /></a></p>
<p>Mocking up, and planning a website is an important part of the creation of any kind of websites. Whether you are going to work with your client to come up with some rough sketches, or you are creating your own website. You need to sit down and figure out exactly what you want on the website. Whenever I am talking with designers who haven&#8217;t done this often I ask them to think about what the website does, what you are trying to get across, and what is the overall goal. If you can come up with a list of design elements and goals for the website creating a mock up will become extremely easy.</p>
<p>Start with understanding who your audience is, how often do they browse the internet, what is their skill level, what kind of website are they looking for. Then go into trying to figure out the main purposes of their visit, for example if it&#8217;s a store website the main purpose for them being there is to purchase items and pay for them. Knowing this information helps you understand what you need to make stand out and what should be placed where.</p>
<h2>Design</h2>
<p><a href="http://web.enavu.com/wp-content/uploads/d.jpg"><img class="alignnone size-full wp-image-1883" title="d" src="http://web.enavu.com/wp-content/uploads/d.jpg" alt="Design" width="400" height="95" /></a></p>
<p>Once you have created your <strong>Mock Up</strong> you are ready to move onto designing the website. Whether you use Photoshop, Fireworks, or Paint you need to start thinking about things like colors and patterns you want to use throughout your design to give it consistency and usability. Something I have found helpful when designing the website is to keep in mind you will be eventually slicing it and getting it ready for use. What this means is that staying mindful to the overall process can help you or whoever is going to slice the design to do everything in a much nicer manner. This could mean keep things in Folders, keep layers organized so that it&#8217;s easy to find elements. User rulers and slices so that the Coder can easily distinguish between the distances you used and the intentions you had. This is useful to you especially if you leave the design to marinate for a while and then come back to it, looking at all those rulers you added can remind you what you really had in mind. Also when creating the design comes the time when you need to pay attention to things like spacing, grids, colors, sizes and all the great stuff that comes with being a designer.</p>
<h2>Slice</h2>
<p><a href="http://web.enavu.com/wp-content/uploads/s.jpg"><img class="alignnone size-full wp-image-1884" title="s" src="http://web.enavu.com/wp-content/uploads/s.jpg" alt="Slice" width="400" height="95" /></a></p>
<p>Slicing is one of those things that you can do a hundred different ways and you still might find ways to improve it. Personally i have found that with every next website i make it becomes easier and easier to know what exactly i will need. If you are not familiar with slicing it&#8217;s the part where you take a design and start generating the images you will need to create your website. Whether it&#8217;s a repeating background or a submit button this is where you create your jpgs, pngs, and gifs. Keep in mind that a lot of the things in your design can likely be recreating using clean and simple CSS, and even CSS3 which with the right amount of Progressive Enhancement can be very beneficial to you and your users.</p>
<h2>HTML</h2>
<p><a href="http://web.enavu.com/wp-content/uploads/h.jpg"><img class="alignnone size-full wp-image-1885" title="h" src="http://web.enavu.com/wp-content/uploads/h.jpg" alt="HTML" width="400" height="95" /></a></p>
<p>The HTML is my favorite part of this process, because it is very precise and beautiful if you do it right. I first start by breaking down the components of my design. Header, footer, navigation, side column and so on. Once i have those down, i start filling them up with the smaller elements like Unordered Lists and Paragraphs with Lorem Ipsum. Something i like to do is use ID&#8217;s for the bigger elements like the header footer and main part of the website, and use classes within for the elements that i will be reusing. Use indentation of course to keep your code organized and easy to work with, and add little pretty HTML comments when you close a DIV or a UL, this will save you a lot of headaches when you come back to add/edit things in your website.</p>
<h2>CSS</h2>
<p><a href="http://web.enavu.com/wp-content/uploads/c.jpg"><img class="alignnone size-full wp-image-1886" title="c" src="http://web.enavu.com/wp-content/uploads/c.jpg" alt="CSS" width="400" height="95" /></a></p>
<p>I find CSS to be an art, just like when a painter sits down and starts adding color to his painting. With CSS i like to start by styling the Main elements as mentioned above, i keep an area in my stylesheet just for those big elements that go on every page. Then once i start adding page specific styling i create a new section with a CSS comment to distinguish between my pages. Now don&#8217;t worry too much about whether an element will be used across the board or in a single page, i have had to take elements out of the specific page code into the general code. With css i also like to use indentation to specify that the styling for the element belongs to the element above it.</p>
<h2>JavaScript/jQuery</h2>
<p><a href="http://web.enavu.com/wp-content/uploads/j.jpg"><img class="alignnone size-full wp-image-1887" title="j" src="http://web.enavu.com/wp-content/uploads/j.jpg" alt="JS" width="400" height="95" /></a></p>
<p>JavaScript and jQuery/MooTools/YUI and so on should be the last thing you add to your website. They are the interactive part of your website, they are what the user can do with the page. If you kept in mind that you will be using JavaScript for your HTML elements when you were writing the code for your page this should be a breeze as all the elements have the correct classes and ID&#8217;s for you to easily manipulate and have your final interactive website ready.</p>
<h2>Conclusion</h2>
<p>The process i have described might not be what works best for you, but if you can understand why i follow those steps, and why this works for me i think you will have a much better idea as to how to optimize your process. For example once you write your HTML you can use the <a title="CSS GENERATOR" href="http://lab.xms.pl/css-generator/">CSS GENERATOR</a> and get the CSS corresponding to your code. Also having the images once you are writing the HTML and the CSS helps with sizing things correctly, and especially with Dreamweaver you can always click browse when you are adding an img src or a css background and directly select the correct image!  Now go out and make a few websites, have fun and happy coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://web.enavu.com/daily-tip/mock-design-slice-html-css-javascript-modern-approach-to-creating-websites/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Centering a Div Vertically and Horizontally via pure CSS or with JS</title>
		<link>http://web.enavu.com/snippets/centering-a-div-vertically-and-horizontally-via-pure-css-or-with-js/</link>
		<comments>http://web.enavu.com/snippets/centering-a-div-vertically-and-horizontally-via-pure-css-or-with-js/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 17:36:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DESIGN]]></category>
		<category><![CDATA[Daily Tip]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://web.enavu.com/?p=1894</guid>
		<description><![CDATA[This tutorial goes over a very simple and clean method of Centering a Div or any other block element Vertically and Horizontally.]]></description>
			<content:encoded><![CDATA[<p>This tutorial goes over a very simple and clean method of Centering a Div or any other block element Vertically and Horizontally.<span id="more-1894"></span></p>
<p>So we begin with our div. Let&#8217;s call it div_center. </p>
<pre name="code" class="html">
&lt;div class=&quot;div_center&quot;&gt;
 Our text can go in here.
&lt;/div&gt;&lt;!--div_center--&gt;
</pre>
<p>The only little problem with the pure CSS method is that we need to know the exact width of the element and a good estimation of the height. So we will need to set a width and a height, then add our padding and add those together. You can set the height to Auto and then just not fully center it Vertically. But here is the actual trick. You position the element fixed, then you add a position left of 50% and a position top of 50%. This doesn&#8217;t exactly do it just yet, now we take the width divide it by two and the resulting number we use as a negative margin left. Same thing for the height, divide and use as negative margin top. Here is a css example:</p>
<pre name="code" class="css">
.div_center {
	width:490px;
	height:390px;
	padding:5px;
	position:fixed;
	left:50%;
	top:50%;
	margin-left:-250px;
	margin-top:-200px;
}
/* alternatively */
.div_center {
	width:490px;
	height:auto;
	padding:5px;
	position:fixed;
	left:50%;
	top:35%;
	margin-left:-250px;
}
/* or if you have a better idea of the height,
assuming the elements height will be around 500px,
you want to use a higher value */

.div_center {
	width:490px;
	height:auto;
	padding:5px;
	position:fixed;
	left:50%;
	top:5%;
	margin-left:-250px;
	margin-top:-250px;
}
</pre>
<p>So now that you know how you can easily do this with pure CSS, it&#8217;s even easier with jQuery.</p>
<p>Since you have already grasped the concept from above, here is the jquery:</p>
<pre name="code" class="js">
$(".center_me").css({'margin-top':$(this).height()/-2, 'margin-left':$(this).width()/-2,"position":"fixed","left":"50%","top":"50%"});
</pre>
<p>Now all you have to worry about is making your element pretty, jquery will take care of everything else!</p>
<p>Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://web.enavu.com/snippets/centering-a-div-vertically-and-horizontally-via-pure-css-or-with-js/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Web Forms: Semantic Mark Up in our Forms [part 2]</title>
		<link>http://web.enavu.com/snippets/web-forms-semantic-mark-up-in-our-forms-part-2/</link>
		<comments>http://web.enavu.com/snippets/web-forms-semantic-mark-up-in-our-forms-part-2/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 23:52:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DESIGN]]></category>
		<category><![CDATA[Daily Tip]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://web.enavu.com/?p=1836</guid>
		<description><![CDATA[Creating forms can be a tricky subject, especially if you go in the table-less path. In this article we discuss the methods of creating semantic forms.]]></description>
			<content:encoded><![CDATA[<p>Creating forms can be a tricky subject, especially if you go in the table-less path. In this article we discuss the methods of creating semantic forms.<span id="more-1836"></span></p>
<p>In the first part of this series we discussed the ways we can help our users to use our forms, today we are going to review how to create forms from the perspective of a Web Developer. I would like to state that this is only one way to accomplish this and there are alternative ways.</p>
<h2>Preface</h2>
<p>Using tables is something I do not like to do unless i am truly forced to by the circumstances (like tabular data). Tables is something you definitely can do without tables, all you need is some good clean html and css. Let&#8217;s create a clean and simple form using pure html and css. And discuss other possible techniques.</p>
<h3>Semantic Form Type 1</h3>
<p>First let us lay down the HTML ground work on which we can start building our form.</p>
<pre class="html" name="code">&lt;form class="form" &gt;
    &lt;fieldset&gt;
		&lt;legend&gt;Semantic Form&lt;/legend&gt;
        &lt;div&gt;
        	&lt;label&gt;First Name:&lt;/label&gt;
            &lt;input type="text" class="field" /&gt;
        &lt;/div&gt;
        &lt;div&gt;
        	&lt;label&gt;Last Name:&lt;/label&gt;
            &lt;input type="text" class="field" /&gt;
        &lt;/div&gt;
        &lt;div&gt;
        	&lt;label&gt;Address:&lt;/label&gt;
            &lt;input type="text" class="field" /&gt;
        &lt;/div&gt;
        &lt;div&gt;
        	&lt;label&gt;Phone:&lt;/label&gt;
            &lt;input type="text" class="field phone" /&gt;
        &lt;/div&gt;
        &lt;div&gt;
        	&lt;input type="submit" value="submit" /&gt;
        &lt;/div&gt;
    &lt;/fieldset&gt;
&lt;/form&gt;
</pre>
<p>In the code above you will notice I use div&#8217;s to horizontally separate the fields. You can use unordered/ordered lists, paragraphs or any other block element.</p>
<p>Now let&#8217;s style the simple form.</p>
<pre class="css" name="code">.form { width:250px; margin:50px auto;} /* set a width for our form, and center it with some spacing above */
.form fieldset {border-top:1px solid #ccc;} /* just for styling the top of the fieldset */
.form fieldset legend {font-size:1.2em; font-weight:600; padding:0px 5px 0px 0px;} /* add some styling to form header */
.form div {clear:both; padding:10px 0px;} /*clear the floated label and input */
.form label {display:block; float:left; width:46%;} /* position the labels to the left */
.form input.field {float:left; margin-left:3%; width:47%;} /* position the input */
</pre>
<p>Keep in mind the above code has had a Eric Meyer reset which removed all margins paddings and borders. As you can see i have added a comment for what each line does in the CSS.</p>
<p>That was easy, simple clean form that just works!</p>
<h3>The Other Possible Methods</h3>
<p>The method above is one of many possible solutions. I have seen people use Unordered Lists instead of my div&#8217;s and others use paragraphs they are all block level elements so they will work just fine. In my demo you will notice the labels float to the left of our input fields, you can also create forms with the text being above each field, all you have to do is remove the float and display the label block! Vuala you have a whole new style in 2 steps!</p>
<p>You can also easily create this into a two column form by simply adding a new fieldset that has its own set width and is floated, it&#8217;s as simple as that!</p>
<h3>What&#8217;s Next</h3>
<p>In our next installment of Web Forms we will talk about validation, the good, the bad and the ugly! Stay tuned for a series that will truly talk about every single aspects of Web Forms!</p>
]]></content:encoded>
			<wfw:commentRss>http://web.enavu.com/snippets/web-forms-semantic-mark-up-in-our-forms-part-2/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Use HTML5 Placeholder Input Attribute Today using jQuery!</title>
		<link>http://web.enavu.com/design/css/use-html5-placeholder-input-attribute-today-using-jquery/</link>
		<comments>http://web.enavu.com/design/css/use-html5-placeholder-input-attribute-today-using-jquery/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 21:54:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DESIGN]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://web.enavu.com/?p=1845</guid>
		<description><![CDATA[How to use jQuery to gain the ability of using html5 placeholder attribute for input fields!]]></description>
			<content:encoded><![CDATA[<p>How to use jQuery to gain the ability of using html5 placeholder attribute for input fields!<span id="more-1845"></span><br />
I had never really thought about this before today but it is very straight forward to create a simple script that will place a generic value inside of our input boxes via the placeholder attribute! The code is extremely simple:</p>
<pre name="code" class="html">
&lt;script src=&quot;http://www.fzilla.com/f/jquery&quot;&gt;&lt;/script&gt;
&lt;script&gt;
$(document).ready(function(){
	function placeholder(){
		$("input[type=text]").each(function(){
			var phvalue = $(this).attr("placeholder");
			$(this).val(phvalue);
		});
	}
	placeholder();
	$("input[type=text]").focusin(function(){
		var phvalue = $(this).attr("placeholder");
		if (phvalue == $(this).val()) {
		$(this).val("");
		}
	});
	$("input[type=text]").focusout(function(){
		var phvalue = $(this).attr("placeholder");
		if ($(this).val() == "") {
			$(this).val(phvalue);
		}
	});
});
&lt;/script&gt;

&lt;input type=&quot;text&quot; name=&quot;search&quot; class=&quot;search_field&quot; placeholder=&quot;search here...&quot; /&gt;
</pre>
<p>So as you can see this is very straight forward, add a value inside the placeholder attribute and have jquery go through all the inputs on the page and add that value inside. On focus remove the value and vuala! And if the field is left blank we populate with place holder again! </p>
]]></content:encoded>
			<wfw:commentRss>http://web.enavu.com/design/css/use-html5-placeholder-input-attribute-today-using-jquery/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>jQuery/CSS Incremental Layout Size Adjuster</title>
		<link>http://web.enavu.com/design/css/jquerycss-incremental-layout-size-adjuster/</link>
		<comments>http://web.enavu.com/design/css/jquerycss-incremental-layout-size-adjuster/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 15:08:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DESIGN]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://web.enavu.com/?p=1825</guid>
		<description><![CDATA[Using jQuery and CSS we will create an incremental layout size adjuster that can make our whole website become either larger or smaller depending on the users preference.]]></description>
			<content:encoded><![CDATA[<p>Using jQuery and CSS we will create an incremental layout size adjuster that can make our whole website become either larger or smaller depending on the users preference.<span id="more-1825"></span></p>
<p>In professional templates for blogs especially you will see an icon with a large A and a small A, by clicking on each you can either increase or decrease the font size of the page. What if you took that a step further and increased or decreased the size of the whole website. Today I will go over a concept I have not seen before that can make your website very unique. This will more or less imitate the browser zoom you may be accustomed to.</p>
<p>First we will start with a very simple html layout.</p>
<pre name="code" class="html">
&lt;body&gt;
&lt;div class=&quot;header&quot;&gt;
	&lt;h1&gt;Lorem Design&lt;/h1&gt;
&lt;/div&gt;&lt;!--header--&gt;
&lt;div class=&quot;left_col&quot;&gt;
	&lt;p&gt; Lorem...ros. &lt;/p&gt;
&lt;/div&gt;&lt;!--left_col--&gt;
&lt;div class=&quot;right_col&quot;&gt;
	&lt;p&gt; Ut...cus. &lt;/p&gt;
	&lt;p&gt; Integer ...ec. &lt;/p&gt;
&lt;/div&gt;&lt;!--right_col--&gt;
&lt;/body&gt;
</pre>
<p>This layout is very traditional, header and two columns. Now that we have the layout let&#8217;s add the styling.</p>
<pre name="code" class="css">
body {
	font-size:16px;
}
.header { width:50.63em; /* 810px */}
.header h1 {font-size:1.75em;  /* 28px */}
.left_col {
	width:18.75em; /* 300px  */
	float:left;
	margin-right:1.25em; /* 20px */
}
.left_col p {
	font-size:1em;  /* 16px */
}
.right_col {
	width:31.25em; /* 500px */
	float:left;
}
.right_col p {
	font-size:1.19em; /* 19px */
}
</pre>
<p>As you can see I have used EM for every single size on the page, from width&#8217;s and margins to font-size. If you haven&#8217;t done this before here is what you need to know. You should always set a custom body font-size, once you set that font size you use it to find the exact width of the rest of the elements. <a href="http://riddle.pl/emcalc/">Here is a nice online calculator</a> that will help you with this. Once you have used EM&#8217;s for everything our job becomes so easy a 1st grader can do it <img src='http://web.enavu.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>Now for the jQuery part. Let&#8217;s add the necessary controls in our webpage, something like this:</p>
<pre name="code" class="html">
&lt;div class=&quot;controls&quot;&gt;&lt;a class=&quot;up&quot;&gt;up&lt;/a&gt; | &lt;a class=&quot;down&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;!--controls--&gt;
</pre>
<p>And now we need the jQuery to incrementally increase and decrease the Layout.</p>
<pre name="code" class="js">
$(document).ready(function(){
	var size = 16;
	$(".controls .up").click(function(){
		size++;
		$("body").animate({fontSize: size});
	});
	$(".controls .down").click(function(){
		size--;
		$("body").animate({fontSize: size});
	});
});
</pre>
<p>So the jQuery sets a variable with the default font-size. And then on click of either control it will increase and decrease the size respectively.</p>
<p><a href="http://web.enavu.com/demos/layout/">Here is a working demo </a>of the concept.</p>
]]></content:encoded>
			<wfw:commentRss>http://web.enavu.com/design/css/jquerycss-incremental-layout-size-adjuster/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Quick and Easy Sprites</title>
		<link>http://web.enavu.com/snippets/quick-and-easy-sprites/</link>
		<comments>http://web.enavu.com/snippets/quick-and-easy-sprites/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 16:27:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DESIGN]]></category>
		<category><![CDATA[Daily Tip]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://web.enavu.com/?p=1806</guid>
		<description><![CDATA[The easiest and fastest method of using sprites in your websites.]]></description>
			<content:encoded><![CDATA[<p>The easiest and fastest method of using sprites in your websites.<span id="more-1806"></span></p>
<p>Sprites might seem like a complicated subject, and i won&#8217;t lie to you they can get confusing at times especially if you decide to make them complicated. Today i wanted to go over the simplest and fastest method there is.</p>
<p>Let&#8217;s define a sprite so it&#8217;s easier to understand the method. Sprites are a way for you to use a single image and display it in multiple ways. Here is a little graphic to illustrate it.</p>
<p><a href="http://web.enavu.com/wp-content/uploads/spritegraphic1.jpg"><img class="alignnone size-full wp-image-1808" title="spritegraphic1" src="http://web.enavu.com/wp-content/uploads/spritegraphic1.jpg" alt="sprite explain graphic 1" width="600" height="128" /></a></p>
<p>As you can see we have an element like an anchor. We usually use an anchor because on hover (cross-browser) we can switch the background position to top and have the bottom of our sprite show up, this usually contains a hover effect of a link. Let&#8217;s look at some sample code.</p>
<pre name="code" class="html">
<style>
a.facebook {display:block; float:left; background:url(http://images.fzilla.com/images/facebook.jpg) top center no-repeat; width:105px; height:34px;}
a.facebook:hover {background-position:bottom;}
</style>

<a class="facebook" href="#"></a>
</pre>
<p>So here is the information you need to know from the styling above. We make the anchor display block so that we can set a custom width and height, otherwise our width and height won&#8217;t apply. We set our background with position top center and make it not repeat although that should be unnecessary  since we are specifying the exact height and width of our sprite. Then the trick is adding the hover effect that changes only the background position to the bottom.</p>
]]></content:encoded>
			<wfw:commentRss>http://web.enavu.com/snippets/quick-and-easy-sprites/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>10 Amazing Free Website Templates</title>
		<link>http://web.enavu.com/snippets/10-amazing-free-website-templates/</link>
		<comments>http://web.enavu.com/snippets/10-amazing-free-website-templates/#comments</comments>
		<pubDate>Tue, 25 May 2010 15:45:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DESIGN]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Snippets]]></category>

		<guid isPermaLink="false">http://web.enavu.com/?p=1726</guid>
		<description><![CDATA[The internet is full of amazing resources like free icons, templates, applications, and so much more. Today we wanted to show you 10 amazing, and completely free website templates.]]></description>
			<content:encoded><![CDATA[<p>The internet is full of amazing resources like free icons, templates, applications, and so much more. Today we wanted to show you 10 amazing, and completely free website templates.<span id="more-1726"></span><br />
<a href="http://freepsdtheme.com/freebie/studioclickhtml.zip" style="display:block; border:5px #eee solid; text-align:center;"></p>
<h3>StudioClick</h3>
<p><img src="http://images.fzilla.com/images/studiotkt.jpg" alt="" border="0" /></a><br />
<a href="http://freepsdtheme.com/freebie/novahtml.zip" style="display:block; border:5px #eee solid; text-align:center;"></p>
<h3>NovaStudio</h3>
<p><img src="http://images.fzilla.com/images/novastudio.jpg" alt="" border="0" /></a><br />
<a href="http://www.templateworld.com/freetemplates/zero/track.php?id=14&amp;flag=2" style="display:block; border:5px #eee solid; text-align:center;"></p>
<h3>AppleWeb</h3>
<p><img src="http://images.fzilla.com/images/appleweb.jpg" alt="" border="0" /></a><br />
<a href="http://www.templateworld.com/freetemplates/zero/track.php?id=5&amp;flag=2" style="display:block; border:5px #eee solid; text-align:center;"></p>
<h3>GreenSolution</h3>
<p><img src="http://images.fzilla.com/images/greensolut.jpg" alt="" border="0" /></a><br />
<a href="http://www.templateworld.com/freetemplates/zero/track.php?id=47&amp;flag=2" style="display:block; border:5px #eee solid; text-align:center;"></p>
<h3>Red</h3>
<p><img src="http://images.fzilla.com/images/redishtzt.jpg" alt="" border="0" /></a><br />
<a href="http://www.templateworld.com/freetemplates/zero/track.php?id=40&amp;flag=2" style="display:block; border:5px #eee solid; text-align:center;"></p>
<h3>GreenWeb</h3>
<p><img src="http://images.fzilla.com/images/greenweb.jpg" alt="" border="0" /></a><br />
<a href="http://www.templateworld.com/freetemplates/zero/track.php?id=37&amp;flag=2" style="display:block; border:5px #eee solid; text-align:center;"></p>
<h3>GConsult</h3>
<p><img src="http://images.fzilla.com/images/gconsuaua.jpg" alt="" border="0" /></a><br />
<a href="http://www.templateworld.com/freetemplates/zero/track.php?id=21&amp;flag=2" style="display:block; border:5px #eee solid; text-align:center;"></p>
<h3>Aquatic</h3>
<p><img src="http://images.fzilla.com/images/aqutic.jpg" alt="" border="0" /></a><br />
<a href="http://www.templateworld.com/freetemplates/zero/track.php?id=1&amp;flag=2" style="display:block; border:5px #eee solid; text-align:center;"></p>
<h3>Jet30</h3>
<p><img src="http://images.fzilla.com/images/jet30ouo.jpg" alt="" border="0" /></a><br />
<a href="http://www.templateworld.com/freetemplates/zero/track.php?id=38&amp;flag=2" style="display:block; border:5px #eee solid; text-align:center;"></p>
<h3>TrialServices</h3>
<p><img src="http://images.fzilla.com/images/trialspmp.jpg" alt="" border="0" /></a></p>
<p>Thanks to the following two websites for the amazing templates:</p>
<p>http://freepsdtheme.com/</p>
<p>http://www.templateworld.com/</p>
]]></content:encoded>
			<wfw:commentRss>http://web.enavu.com/snippets/10-amazing-free-website-templates/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google Releases a Library of Web Fonts you can use</title>
		<link>http://web.enavu.com/daily-tip/google-releases-a-library-of-web-fonts-you-can-use/</link>
		<comments>http://web.enavu.com/daily-tip/google-releases-a-library-of-web-fonts-you-can-use/#comments</comments>
		<pubDate>Thu, 20 May 2010 15:56:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DESIGN]]></category>
		<category><![CDATA[Daily Tip]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://web.enavu.com/?p=1786</guid>
		<description><![CDATA[Yesterday google announced a library of fonts that use the CSS3 @font-face properties to be embedded into webpages. You can go and get some free fonts for your website from here.
So why is google releasing a library of web fonts, well it&#8217;s quite simple actually. Google promotes the newest web technologies because they are a [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday google announced a library of fonts that use the CSS3 @font-face properties to be embedded into webpages. You can go and get some free fonts for your website from <a href="http://code.google.com/webfonts">here</a>.</p>
<p>So why is google releasing a library of web fonts, well it&#8217;s quite simple actually. Google promotes the newest web technologies because they are a web company. I am assuming not too far from now they will have a wide selection of fonts to use in Google Docs (the Microsoft Word web alternative). Google is a web company and they strive on progressing the web. Our sources in the Google IO conference this year told us that google is working on a Flash alternative that will build HTML5 animations. Very excited to see how that turns out.</p>
<p>As I wrote in my <a href="http://web.enavu.com/daily-tip/fonts-web-2-0-edition/">Web Fonts 2.0</a> article there are some light down sides to using @font-face. But with googles delivery speed it&#8217;s a good bet you won&#8217;t find yourself in too much hassle.</p>
]]></content:encoded>
			<wfw:commentRss>http://web.enavu.com/daily-tip/google-releases-a-library-of-web-fonts-you-can-use/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fonts Web 2.0 Edition</title>
		<link>http://web.enavu.com/daily-tip/fonts-web-2-0-edition/</link>
		<comments>http://web.enavu.com/daily-tip/fonts-web-2-0-edition/#comments</comments>
		<pubDate>Thu, 13 May 2010 16:01:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[DESIGN]]></category>
		<category><![CDATA[Daily Tip]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://web.enavu.com/?p=1697</guid>
		<description><![CDATA[Fonts are one of the most important design elements in any website. When the term Web 2.0 first started coming out a lot of logo&#8217;s were considered Web 2.0 because of a common use of certain fonts. 
Personally I see the use of certain fonts in our designs as a Web 2.0 element. When Web [...]]]></description>
			<content:encoded><![CDATA[<p>Fonts are one of the most important design elements in any website. When the term Web 2.0 first started coming out a lot of logo&#8217;s were considered Web 2.0 because of a common use of certain fonts. </p>
<p>Personally I see the use of certain fonts in our designs as a Web 2.0 element. When Web 2.0 started there was a big burst of people using sIFR to display any font on their website with Flash. But flash isn&#8217;t an idea solution so things like Cufon came out that allowed you to display those fonts with JavaScript image replacement techniques. </p>
<p>Today we have the most amazing technique that works close to perfectly, and that is the @font-face CSS property that is supported by 97% of browsers. However this wasn&#8217;t always the case as this technique requires you to use a few different font formats at the same time for it to work on all browsers. This can become a rather unpleasant task but we have tools like <a href="http://typekit.com">TypeKit</a> that give us everything that is necessary to do it.</p>
<p>I had the pleasure of meeting the Founder of <a href="http://typekit.com">TypeKit</a> and the Owner of FontShop.com and after a discussion about web fonts I was very excited to write an article about fonts and how they are transforming the way we create website. </p>
<p>So let&#8217;s address the 2 known issues with using @font-face fonts. First of all the process of applying these fonts can cause a problem if the font takes time to load. The problem can play out in two ways, either the browser will use a fallback font until the font is loaded and then it will jump the new font in place after its downloaded, this can make the page jump around a little bit. The second thing is you can make the page wait until the font is loaded. With today&#8217;s fast speed internet and <a href="http://typekit.com">TypeKit</a>&#8217;s special techniques in place you will probably never have to worry about either. </p>
<p>Never used @font-face before and are worried that it&#8217;s complicated, go to <a href="http://typekit.com">TypeKit</a> register for an account and follow the steps, you will be using @font-face like a pro in minutes!</p>
<p>If you love <a href="http://typekit.com">TypeKit</a> then you will enjoy <a href="http://www.fontsquirrel.com/">FontSquirrel</a> as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://web.enavu.com/daily-tip/fonts-web-2-0-edition/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Coding/Slicing Websites using Images vs. CSS3 &amp; HTML5</title>
		<link>http://web.enavu.com/tutorials/codingslicing-websites-using-images-vs-css3-html5/</link>
		<comments>http://web.enavu.com/tutorials/codingslicing-websites-using-images-vs-css3-html5/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 05:23:33 +0000</pubDate>
		<dc:creator>agrublev</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://blog.webdevmania.com/?p=542</guid>
		<description><![CDATA[With the upcoming uses of CSS3 allowing you to forgo the usual image slicing for a much nicer cleaner way of accomplishing the same thing once wonders what to use CSS for and what to do with images.
I have said this before and i feel i should keep repeating it, you should always spend time [...]]]></description>
			<content:encoded><![CDATA[<p>With the upcoming uses of CSS3 allowing you to forgo the usual image slicing for a much nicer cleaner way of accomplishing the same thing once wonders what to use CSS for and what to do with images.</p>
<p><span id="more-542"></span>I have said this before and i feel i should keep repeating it, you should always spend time to learn more about your visitors. This means what browser they use, what is their resolution, and even what operating system they are using. Well there are quite a few more things to be known of your visitors behavior but for today&#8217;s article we will try and go over the things that matter when evaluating whether to use CSS or a sliced image.</p>
<p>For this blog i have used various CSS3 techniques instead of spending loads of time on slicing my initial photoshop design, why was I able to do this? Well simply because a web development blog has 60% Firefox (95% of those use the newest 3.6.x version) then another 20% goes to chrome, and the rest is distributed to IE, Safari, and of course Opera. What this means is that 90% of our users will see the website exactly as intended, and the rest will see a very slightly different version which looks great. The other great benefit to this is much faster load times, less graphics is always a benefit to a high traffic web development blog, or to really any website with 100k+ page views. Here is the difference between IE and Firefox:</p>
<p><img src="http://images.fzilla.com/images/ffie.jpg" alt="comparing ie to ff" /></p>
<p>The tricky part comes when you have to be careful and distinguish functionality with appearance. You should never ignore functionality when using advanced CSS techniques to accomplish certain effects. As a web developer you already know to test your websites in most modern browsers, personally i test on IE7/IE8, Firefox, Chrome, and Opera. But never let functionality struggle because you wanted to save time slicing your design. Things like Rounded Corners, Drop Shadows, and other styling techniques are usually a safe bet of things being only different visually. Text-Shadow can cause text to appear harder to read when the browser does not support text-shadows.</p>
<p>Using HTML5 is awesome, it allows you to create websites with a lot of bells and whistles with little to no effort. However things like HTML5 validation do not work in all browsers so you need to make sure you have a back-up. I have created an HTML5 CSS3 framework that has a lot of cool features that are okay to use with all browsers. Check it out <a href="http://52framework.com">52framework</a>.</p>
<p>In conclusion I strongly suggest and support web developers to try using the new technologies that make our lives easier as long as you have made sure that it does not cripple your websites. </p>
<p>Checkout the following websites to help you use these amazing technologies:</p>
<p><a href="http://52framework.com">52framework.com</a><br />
<a href="http://css3generator.com">css3generator.com</a><br />
<a href="http://www.modernizr.com/">modernizr.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://web.enavu.com/tutorials/codingslicing-websites-using-images-vs-css3-html5/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

