<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>How to CSS</title>
	
	<link>http://www.how-to-css.com</link>
	<description>How to use CSS to make your website better.</description>
	<pubDate>Tue, 14 Apr 2009 14:24:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/HowToCss" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Screen Casts for beginners - soon</title>
		<link>http://feedproxy.google.com/~r/HowToCss/~3/8o1QH6PLsVA/</link>
		<comments>http://www.how-to-css.com/css/screen-casts-for-beginners-soon/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 19:36:18 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[screencast]]></category>

		<guid isPermaLink="false">http://www.how-to-css.com/?p=140</guid>
		<description><![CDATA[There are a lot of good sites out there that offer tips, tricks, and how-tos for the mid to advanced level coders and designers. However, I haven&#8217;t found many great resources for people looking to start out fresh, from the beginning. This means learning HTML, and then learning CSS (or learning them together). I find [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lot of good sites out there that offer tips, tricks, and how-tos for the mid to advanced level coders and designers. However, I haven&#8217;t found many great resources for people looking to start out fresh, from the beginning. This means learning HTML, and then learning CSS (or learning them together). I find that a lot of people at this level are interested in learning how to use Dreamweaver, and are more interested in the WYSIWYG editor in Dreamweaver then learning how to code by hand.</p>
<p>There is no substitute for hand written code. Something created in Dreamweaver&#8217;s design view will never equal the well structured code that can be done with a text editor. It doesn&#8217;t matter if you&#8217;re on Windows or a Mac, in Textmate or Notepad++ or even Dreamweaver&#8217;s code view. What matters is you learn the language and best practices.</p>
<p>I&#8217;m experimenting with some screencasting software. Look for new tutorials for the beginner starting hopefully next week. If you&#8217;re beyond the beginner level, my apologies, but head over and check out <a href="http://www.css-tricks.com">Chris Coyier&#8217;s CSS tricks</a> or <a href="http://www.nettuts.com">net tuts</a>. We&#8217;ll work up to those levels on this site, but for a while, we&#8217;re going back to the basics, and we&#8217;re going to do it using a hands-on approach with the aid of a screencast.</p>
<img src="http://feeds.feedburner.com/~r/HowToCss/~4/8o1QH6PLsVA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how-to-css.com/css/screen-casts-for-beginners-soon/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.how-to-css.com/css/screen-casts-for-beginners-soon/</feedburner:origLink></item>
		<item>
		<title>/ - why that slash is good</title>
		<link>http://feedproxy.google.com/~r/HowToCss/~3/UCqhY7DNnAA/</link>
		<comments>http://www.how-to-css.com/html/why-that-slash-is-good/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 00:06:44 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[html]]></category>

		<category><![CDATA[directory structure]]></category>

		<category><![CDATA[paths]]></category>

		<guid isPermaLink="false">http://www.how-to-css.com/?p=137</guid>
		<description><![CDATA[This might be a bit basic for a lot of you, but it&#8217;s something a lot of people don&#8217;t really know about, and it kind of surprises me.
Do you know the difference between:

images/someimage.jpg
../images/someimage.jpg
/images/someimage.jpg
The first two are relative to the document, the last one is relative to the root directory. This is useful when you&#8217;re coding [...]]]></description>
			<content:encoded><![CDATA[<p>This might be a bit basic for a lot of you, but it&#8217;s something a lot of people don&#8217;t really know about, and it kind of surprises me.</p>
<p>Do you know the difference between:</p>
<p>
<code>images/someimage.jpg
../images/someimage.jpg
/images/someimage.jpg</code></p>
<p>The first two are relative to the document, the last one is relative to the root directory. This is useful when you&#8217;re coding large sites with sub sections. Normally, for a five or six page site I&#8217;ll keep all my pages in my main directory, and then use an includes folder, a css folder, and an images folder. On larger sites, I&#8217;ll use more directories. So I may have ten or more folders, each containing up to ten or more files in it. If I need to get into that images folder, I have two options (3 if you use the full url). I can use ../images/someimage.jpg which means up one directory, then into the images folder or, I can use /images/someimage.jpg. Using the second method, it doesn&#8217;t matter what directory the page is in, it goes to the images folder from the site&#8217;s home directory.</p>
<p>Why is this important? Most times you don&#8217;t really move pages around, but in order to cut down on the amount of repeat coding, you do use includes. So, if I&#8217;m using an include for my navigation, the home page which is in the root directory is going to be at a different depth then a page in a subfolder. If I use site relevant paths for all my pages in the navigation that I&#8217;m including, then it won&#8217;t matter what depth the file is, or which directory it is placed in.</p>
<p>/about/index.php will take you into the about folder whether you&#8217;re at the home page, index.php, or if you&#8217;re in the about directory already at about/contact.php or in a different directory like work/print.php.</p>
<img src="http://feeds.feedburner.com/~r/HowToCss/~4/UCqhY7DNnAA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how-to-css.com/html/why-that-slash-is-good/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.how-to-css.com/html/why-that-slash-is-good/</feedburner:origLink></item>
		<item>
		<title>XHTML vs. HTML</title>
		<link>http://feedproxy.google.com/~r/HowToCss/~3/8Un_gchOePw/</link>
		<comments>http://www.how-to-css.com/html/xhtml-vs-html/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 19:48:11 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[html]]></category>

		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.how-to-css.com/?p=135</guid>
		<description><![CDATA[For all intensive purposes, XHTML is a more strict version of HTML with some of the benefits of XML. It&#8217;s goal is to be more cross-browser compatible. With that said, many of the websites I author, I still author in HTML, even though I follow 95% of the XHTML rules. Really, changing to XHTML would [...]]]></description>
			<content:encoded><![CDATA[<p>For all intensive purposes, XHTML is a more strict version of HTML with some of the benefits of XML. It&#8217;s goal is to be more cross-browser compatible. With that said, many of the websites I author, I still author in HTML, even though I follow 95% of the XHTML rules. Really, changing to XHTML would be pretty easy for me, because the only rule I don&#8217;t follow is I don&#8217;t close my tags that aren&#8217;t a pair. For example, I don&#8217;t close my break tags.</p>
<p>
<code>HTML
&lt;br&gt;
XHTML
&lt;br /&gt;</code></p>
<p>For a valid XHTML document, all tags must be lowercase. I follow this already in my HTML.</p>
<p>
<code>Bad
&lt;DIV ID=&#8221;sidebar&#8221;&gt;
Good
&lt;div id=&#8221;sidebar&#8221;&gt;</code></p>
<p>All pages must have a valid doctype declared, which I do, I just declare HTML.</p>
<p>
<code>Strict declaration
&lt;!DOCTYPE html
PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Strict//EN&#8221; 
&#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#8221;&gt;

Transitional
&lt;!DOCTYPE html
PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221;
&#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;

Frameset
&lt;!DOCTYPE html
PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Frameset//EN&#8221;
&#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd&#8221;&gt;</code></p>
<p>Attributes can&#8217;t be minimized in XHTML, and I don&#8217;t minimize them in HTML</p>
<p>
<code>Bad
&lt;option value=&#8221;MO&#8221; selected&gt;
Good
&lt;option value=&#8221;MO&#8221; selected=&#8221;selected&#8221;&gt;MO&lt;/option&gt;</code></p>
<p>Also, all attributes must be in quotes.</p>
<p>
<code>Bad
&lt;table width=90%&gt;
Good
&lt;table width=&#8221;90%&#8221;&gt;</code></p>
<p>Instead of using name, XHTML uses id (also notice I closed the image tag with the /.</p>
<p>
<code>bad
&lt;img src=&#8221;images/myimage.jpg&#8221; name=&#8221;mainimage&#8221; /&gt;
good
&lt;img src=&#8221;images/myimage.jpg&#8221; id=&#8221;mainimage&#8221; /&gt;</code></p>
<p>As you can see XHTML is pretty easy, not too much different from our HTML we already write. For me the transition would just require a change of habit, and really just the addition of some closing &#8220;/&#8221;s and the changing of my doctype in my site template I always start with. If it means easier compatibility then I might as well start using XHTML now.</p>
<img src="http://feeds.feedburner.com/~r/HowToCss/~4/8Un_gchOePw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how-to-css.com/html/xhtml-vs-html/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.how-to-css.com/html/xhtml-vs-html/</feedburner:origLink></item>
		<item>
		<title>ID that Body - Clean CSS Navigation</title>
		<link>http://feedproxy.google.com/~r/HowToCss/~3/1H67xdJCvTM/</link>
		<comments>http://www.how-to-css.com/css/id-that-body-clean-css-navigation/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 17:49:06 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[css navigation]]></category>

		<guid isPermaLink="false">http://www.how-to-css.com/?p=133</guid>
		<description><![CDATA[Just like cop dramas, the first step to a good navigation is the same as it is in solving a crime. You have to ID the body.
If you assign an ID on the body tag then you have a simple way to target items on any particular page. If you want the paragraph text on [...]]]></description>
			<content:encoded><![CDATA[<p>Just like cop dramas, the first step to a good navigation is the same as it is in solving a crime. You have to ID the body.</p>
<p>If you assign an ID on the body tag then you have a simple way to target items on any particular page. If you want the paragraph text on your contact page to be 16px tall then you have a simple way of targeting that text, assuming you ID the body on that page with contact:</p>
<p>
<code>#contact p {font-size: 16px;}</code></p>
<p>However, you get to understand the true power of IDing the body tag with using it for navigation. Assign each link in your navigation a class, then create a style for when the body&#8217;s ID and the link&#8217;s class match.</p>
<p>Your Navigation:</p>
<p>
<code>&lt;body id="home"&gt;
&lt;ul id=&#8221;nav&#8221;&gt;
&lt;li&gt;&lt;a class=&#8221;home&#8221; href=&#8221;#&#8221;&gt;home&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#8221;about&#8221; href=&#8221;#&#8221;&gt;about&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#8221;contact&#8221; href=&#8221;#&#8221;&gt;contact&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</code></p>
<p>Your CSS:</p>
<p>
<code>ul#nav {
  background: #000;
  list-style: none;
  font-family: Tahoma, Verdana, Arial, Sans-Serif;
}
ul#nav li {
  float: left;
  margin: 0 15px;
}
ul#nav li a, ul#nav li a:visited {
  text-decoration: none;
  color: #fff;
}
ul#nav li a:hover {
  color: #666;
}
/* here is the magic, when the body ID and the link Class are the same, this style is applied. */
#home .home, #about .about, #contact .contact {
  color: #ccc;
}</code></p>
<p>This is pretty straight forward, but it works really well. The best application is when you use a dynamic language like PHP to include the menu on every page, so you have only one or two files to update in the event something changes with the navigation (the included file and/or the CSS file).</p>
<img src="http://feeds.feedburner.com/~r/HowToCss/~4/1H67xdJCvTM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how-to-css.com/css/id-that-body-clean-css-navigation/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.how-to-css.com/css/id-that-body-clean-css-navigation/</feedburner:origLink></item>
		<item>
		<title>Designing for your Target Audience - 24ways.org</title>
		<link>http://feedproxy.google.com/~r/HowToCss/~3/UKcGzzjoGw4/</link>
		<comments>http://www.how-to-css.com/css/designing-for-your-target-audience-24waysorg/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 14:00:11 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.how-to-css.com/?p=130</guid>
		<description><![CDATA[
Head over to 24ways.org for this years pre-Christmas web goodness. I&#8217;ve read a lot of positive and negative about the design. Wether you like it or not, this is a great example of designing for your target audience. Many web designers/developers will be visiting this site, so you can bet on visitors having new, and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.how-to-css.com/wp-content/uploads/2008/12/24ways.jpg"><img src="http://www.how-to-css.com/wp-content/uploads/2008/12/24ways-150x150.jpg" alt="" title="24ways" width="150" height="150" class="alignright size-thumbnail wp-image-131" /></a>
<p>Head over to <a href="http://24ways.org/">24ways.org</a> for this years pre-Christmas web goodness. I&#8217;ve read a lot of positive and negative about the design. Wether you like it or not, this is a great example of designing for your target audience. Many web designers/developers will be visiting this site, so you can bet on visitors having new, and what I consider &#8220;good&#8221; browsers. The screenshot here is from IE6.</p>
<p>Most of the time, my target audience for the web sites I make include IE6. As much as I hate it, it&#8217;s  a fact I&#8217;ve learned to live with. Though you don&#8217;t have to serve up an exact duplicate of your site to IE6 users, you have to come up with something useable. Conditional stylesheets help out a lot, even if you use it to simply hide your stylesheet from IE6. So, while 24ways.org can get a way with something more innovative - I cannot.</p>
<img src="http://feeds.feedburner.com/~r/HowToCss/~4/UKcGzzjoGw4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how-to-css.com/css/designing-for-your-target-audience-24waysorg/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.how-to-css.com/css/designing-for-your-target-audience-24waysorg/</feedburner:origLink></item>
		<item>
		<title>The Art and Science of CSS</title>
		<link>http://feedproxy.google.com/~r/HowToCss/~3/B7DDDIFlE6U/</link>
		<comments>http://www.how-to-css.com/css/the-art-and-science-of-css/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 19:25:47 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.how-to-css.com/?p=125</guid>
		<description><![CDATA[For another week, if you follow Sitepoint on Twitter you can download The Art and Science of CSS for free. I glanced through the first chapter or so this morning and it looks like it has some good stuff in it. The bits that I looked at covered some text-replacement methods that works even when [...]]]></description>
			<content:encoded><![CDATA[<p>For another week, if you <a href="http://twitaway.aws.sitepoint.com/">follow Sitepoint</a> on Twitter you can download <em>The Art and Science of CSS</em> for free. I glanced through the first chapter or so this morning and it looks like it has some good stuff in it. The bits that I looked at covered some text-replacement methods that works even when users have images turned off (something I haven&#8217;t looked at or really given much thought to in the past). So I&#8217;m going to dig a little deeper into it. It probably won&#8217;t be earth shattering for those versed in CSS, but if you&#8217;re starting out I&#8217;d recommend checking it out.</p>
<p>Sitepoint is often a good resource, but the 99designs thing they&#8217;ve got going has left a bad taste in my mouth. It really is just spec work, and <a href="http://www.no-spec.com/">spec work is bad</a> for many reasons. The work is often just unskilled type treatments, done for hundreds of dollars below market value. Any real designer should frown on the idea of selling their service for less than it&#8217;s worth, it&#8217;s insulting. Most of the designs have little conceptual thought, and lack big picture thinking. Everyone loses with 99designs, except for 99designs itself which takes a cut off of the ignorance of the other two parties involved. If you&#8217;re so desperate for $200 that you&#8217;ll give away a $800 - $1200 logo then need to rethink your career path. Seriously, look at the big picture. Corporate America - 40 hours of work a week should provide a decent living. Now, would you work for 1/4 of that? Do you really want to work 160 hours in that week (which is barely possible) to maintain the same level of living?</p>
<img src="http://feeds.feedburner.com/~r/HowToCss/~4/B7DDDIFlE6U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how-to-css.com/css/the-art-and-science-of-css/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.how-to-css.com/css/the-art-and-science-of-css/</feedburner:origLink></item>
		<item>
		<title>Web Design Jobs - 7+ places to find work</title>
		<link>http://feedproxy.google.com/~r/HowToCss/~3/4t1nVGs943o/</link>
		<comments>http://www.how-to-css.com/career-resources/web-design-jobs-7-places-to-find-work/#comments</comments>
		<pubDate>Wed, 19 Nov 2008 19:14:55 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[career resources]]></category>

		<category><![CDATA[career]]></category>

		<category><![CDATA[web jobs]]></category>

		<guid isPermaLink="false">http://www.how-to-css.com/?p=107</guid>
		<description><![CDATA[This really isn&#8217;t about CSS, just something I&#8217;ve noticed a lot lately, and the trend keeps growing.
Over the past year or two, this job board thing has gotten out of hand. You used to be able to go to Monster, or Careerbuilder, and find your dream job. Now, however, the dream job doesn&#8217;t get posted [...]]]></description>
			<content:encoded><![CDATA[<p>This really isn&#8217;t about CSS, just something I&#8217;ve noticed a lot lately, and the trend keeps growing.</p>
<p>Over the past year or two, this job board thing has gotten out of hand. You used to be able to go to Monster, or Careerbuilder, and find your dream job. Now, however, the dream job doesn&#8217;t get posted on those large sites. Instead, the great jobs get posted on one of many job boards, so you have to watch all of them because you never know which one will have your dream job. It&#8217;s like anyone with a decent readership wants a job board, and why not, because it&#8217;s a pretty easy way to make some money ($100 a listing, $200 a listing, $300 a listing). That adds up.</p>
<p><a href="http://www.authenticjobs.com"><img src="http://www.how-to-css.com/images/jobBoards/authenticJobs.jpg" alt="Authentic Jobs"></a></p>
<p>Authentic Jobs has the right idea. They offer a money back guarantee to listers, and they (or he) has a network of high traffic sites that display the Authentic Jobs feeds. I believe there is probably a referrers fee paid to the site that leads to someone finding a job. Chances are, one of the websites you visit regularly displays the Authentic Jobs feed. Listing price - $250 full time, $75 freelance.</p>
<p><a href="http://jobs.smashingmagazine.com"><img src="http://www.how-to-css.com/images/jobBoards/smashingJobs.jpg" alt="Smashing Jobs"></a></p>
<p>With Smashing Jobs you get a pretty good list of available jobs (<a href="http://cpbgroup.com/">Crispin Porter and Bogusky</a> post here - Burger King, VW, maybe you&#8217;ve heard of them). Smashing Mag is one of the top blogs, so the job listings get really good exposure. Listing price - $200 full time, $100 freelance.</p>
<p><a href="http://www.creativehotlist.com"><img src="http://www.how-to-css.com/images/jobBoards/creativeHotlist.jpg" alt="Creative Hotlist"></a></p>
<p>Not web industry specific, but it is a great place to find work. This job board is specific to what I&#8217;d consider creative companies. Ad agencies, design studios, web shops, etc.</p>
<p><a href="http://jobs.webdesignerwall.com/"><img src="http://www.how-to-css.com/images/jobBoards/wall.jpg" alt="Web Designer Wall"></a></p>
<p>This is a short list, and you won&#8217;t find many big name employers here. Maybe a good place to look if you&#8217;re interested in picking up some freelance work. My only concern would be the person looking to hire your services are looking to do so at a discounted rate. Listing price - $75 for 30 days fulltime, $50 freelance.</p>
<p><a href="http://www.talentzoo.com/"><img src="http://www.how-to-css.com/images/jobBoards/talentZoo.jpg" alt="Talent Zoo Jobs"></a></p>
<p>Like the creative hotlist, this isn&#8217;t web specific. Because of that, you&#8217;ll probably find a lot of more general advertising and design jobs posting here. Listing price - $269 for 60 days.</p>
<p><a href="http://jobs.37signals.com"><img src="http://www.how-to-css.com/images/jobBoards/37signals.jpg" alt="37 Signals"></a></p>
<p>37signals makes some great little products, or so I&#8217;ve heard (I&#8217;ve never used them). Their job listings are a little weak - unless you&#8217;re a RoR guy. If that&#8217;s the case - you should probably start looking there. Listing price - $300 for a month.</p>
<p><a href="http://howdesign.coroflot.com/public/jobs_browse.asp?job_category_id_13=13"><img src="http://www.how-to-css.com/images/jobBoards/how.jpg" alt="How Design Jobs"></a></p>
<p>Like the Creative Hotlist and Talent Zoo, you&#8217;ll find a larger variety of companies listing here. You&#8217;re pretty much guaranteed you&#8217;ll find only agencies here, not many in-house gigs. Listing price - $265 for a full 90 days.</p>
<h3>Want more? How about these</h3>
<p><a href="http://jobs.readwriteweb.com/"><img src="http://www.how-to-css.com/images/jobBoards/readWrite.jpg" alt="Read Write Web"></a></p>
<p>Listing price - $99 for 30 days.</p>
<p><a href="http://www.freshwebjobs.com/"><img src="http://www.how-to-css.com/images/jobBoards/freshJobs.jpg" alt="Fresh Web Jobs"></a></p>
<p>Listing price - $75 for 30 days.</p>
<p>I&#8217;m sure I missed a couple, so feel free to let me know.</p>
<img src="http://feeds.feedburner.com/~r/HowToCss/~4/4t1nVGs943o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how-to-css.com/career-resources/web-design-jobs-7-places-to-find-work/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.how-to-css.com/career-resources/web-design-jobs-7-places-to-find-work/</feedburner:origLink></item>
		<item>
		<title>Using CSS Sprites</title>
		<link>http://feedproxy.google.com/~r/HowToCss/~3/DoUmqAEvXqg/</link>
		<comments>http://www.how-to-css.com/css/using-css-sprites/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 19:46:35 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[navigation]]></category>

		<category><![CDATA[Sprites]]></category>

		<guid isPermaLink="false">http://www.how-to-css.com/?p=101</guid>
		<description><![CDATA[What are Sprites in CSS?
Simply put when you use &#8220;sprites&#8221; in CSS it&#8217;s a way of using one background image, and then changing it&#8217;s position.
Why use Sprites?
It all boils down to load time and efficiency. If you use a sprite for a background for an image, then you cut down on the total file size, [...]]]></description>
			<content:encoded><![CDATA[<p>What are Sprites in CSS?</p>
<p>Simply put when you use &#8220;sprites&#8221; in CSS it&#8217;s a way of using one background image, and then changing it&#8217;s position.</p>
<p>Why use Sprites?</p>
<p>It all boils down to load time and efficiency. If you use a sprite for a background for an image, then you cut down on the total file size, and the number of http requests. If you&#8217;ve ever seen an Apache server log, you&#8217;ll see what I&#8217;m talking about. When a client requests a page from a server, the server sends the requested page, and makes requests of its own, on itself. The server requests all the images, each one is a separate http request, and each one gets served separately. A single page could have many http requests.</p>
<p>So, let&#8217;s take a look at using a Sprite for a navigation. Here is the Sprite (you can get it, and all the other files needed by downloading the <a href="http://www.how-to-css.com/demos/sprites.zip">demo files</a>. You can also <a href="http://www.how-to-css.com/demos/sprites/index.html">view the demo</a>.</p>
<p><a href="http://www.how-to-css.com/demos/sprites/index.html"><img src="http://www.how-to-css.com/wp-content/uploads/2008/11/spritebg.jpg" alt="" title="spritebg" width="390" height="30" class="alignnone size-full wp-image-103" /></a></p>
<p>So let&#8217;s look at the code.</p>
<p>The pages look like any other page, the navigation is simply an unordered list, each list item is floated left. We put an ID on the body tag, and a class on the navigation to show the active state, especially if we were looking to put our navigation in an include (which I do). For this little tutorial I&#8217;m using HTML pages instead of PHP so you can just open the page in your browser, no server required.</p>
<p>
<code>&lt;ul id="mainNav"&gt;
    &lt;li&gt;&lt;a class=&#8221;home&#8221; href=&#8221;index.html&#8221;&gt;home&lt;/a&gt;&lt;/li&gt;
    
    &lt;li&gt;&lt;a class=&#8221;page2&#8243; href=&#8221;page2.html&#8221;&gt;page 2&lt;/a&gt;&lt;/li&gt;
    
    &lt;li&gt;&lt;a class=&#8221;page3&#8243; href=&#8221;#&#8221;&gt;page 3&lt;/a&gt;&lt;/li&gt;
    
    &lt;li&gt;&lt;a class=&#8221;page4&#8243; href=&#8221;#&#8221;&gt;page 4&lt;/a&gt;&lt;/li&gt;
    
    &lt;li&gt;&lt;a class=&#8221;page5&#8243; href=&#8221;#&#8221;&gt;page 5&lt;/a&gt;&lt;/li&gt;
    
    &lt;li&gt;&lt;a class=&#8221;page6&#8243; href=&#8221;#&#8221;&gt;page 6&lt;/a&gt;&lt;/li&gt;  
    
  &lt;/ul&gt;</code></p>
<p>So now let&#8217;s look at the CSS, which may be the tricky part (though not really). I normally write all my CSS on one line, and you&#8217;ll find it that way in the demo, but for readability here, I&#8217;ll write it block-style.</p>
<p>
<code>#mainNav {
  list-style: none;
  padding: 0;
  margin: 0;
}

#mainNav li {
  float: left;
  font-size: 20px;
  font-family: Verdana, Arial, Sans-Serif;
  letter-spacing: -1px;
  line-height: 30px;
  text-align: center;
}

#mainNav li a, #mainNav li a:visited {
  color: #fff;
  text-decoration: none;
  background: url(&#8217;../images/spriteBG.jpg&#8217;) 0 top;
  width: 130px;
  height: 30px;
  display: block;
}

#mainNav li a:hover {
  color: #fff;
  background: url(&#8217;../images/spriteBG.jpg&#8217;) 260px top;
}

#home li a.home, #page2 li a.page2, #page3 li a.page3, #page4 li a.page4, #page5 li a.page5, #page6 li a.page6 {
  color: #600;
  background: url(&#8217;../images/spriteBG.jpg&#8217;) 130px top;
}</code></p>
<p>The styles look pretty normal for a navigation. But, look at the background. For a link, or a visited link, the position of the background is set for the top and 0. When you hover the button, the background shifts the x position to 260px. And when the link is active (the last style), the background is shifted over 130px.</p>
<p>That&#8217;s about it. If you get really creative you can <a href="http://snook.ca/archives/javascript/jquery-bg-image-animations/">animate your backgrounds with jquery</a>.</p>
<p><a href="http://www.how-to-css.com/demos/sprites.zip"><img src="http://www.how-to-css.com/images/download.png" alt="download" /></a></p>
<img src="http://feeds.feedburner.com/~r/HowToCss/~4/DoUmqAEvXqg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how-to-css.com/css/using-css-sprites/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.how-to-css.com/css/using-css-sprites/</feedburner:origLink></item>
		<item>
		<title>Geocoding with jquery, php, and google maps</title>
		<link>http://feedproxy.google.com/~r/HowToCss/~3/P-poSfO99D0/</link>
		<comments>http://www.how-to-css.com/php/geocoding-with-jquery-php-and-google-maps/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 21:09:31 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[javascript]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[geocoding]]></category>

		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.how-to-css.com/?p=85</guid>
		<description><![CDATA[Simple Demo
I haven&#8217;t played much with the Google Map API, but I&#8217;m in need of using it for a project for a construction/commercial leasing company. So, I started playing around with it this morning and found a couple of excellent tutorials. The attached files are a little rough, but this just playing around. The final [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.how-to-css.com/demos/geocoding/">Simple Demo</a></p>
<p>I haven&#8217;t played much with the Google Map API, but I&#8217;m in need of using it for a project for a construction/commercial leasing company. So, I started playing around with it this morning and found a couple of excellent tutorials. The attached files are a little rough, but this just playing around. The final product is going to simply have variables passed to it from the database - so that means the user will just see a map with a marker.</p>
<p>The first one from <a href="http://nettuts.com/videos/screencasts/this-is-how-you-use-the-google-maps-api/">Nettuts.com</a>. The second from a site that I can&#8217;t seem to find again. (If you see this, and you recognize your code - let me know)</p>
<p>Anyway, like I said, the code isn&#8217;t necessarily the prettiest, but I just started working on it today. I&#8217;ll be passing the variables from a database to map property locations, but this takes inputs, for testing while setting it up.</p>
<p>I couldn&#8217;t decide on whether to convert the address to latitude and longitude and save them in the database, or just get the lat &amp; long when the details page is opened for a piece of property. I went with the latter, because I heard Google won&#8217;t allow more than a couple hundred connections from your API per hour, then they&#8217;ll shut you down for the day. When they&#8217;re adding a bunch of properties (like during the initial set-up) this could be a problem. Though I guess I could just have them get the lat and long and manually enter it. Anyway, from what I&#8217;ve seen, the conversion of address to latitude and longitude is dead on.</p>
<p>Get your own API at <a href="http://code.google.com/apis/maps/">Google</a>. I have my API to use the domain name of localhost right now for local testing, I&#8217;ll just get one for the actual domain name when the site goes live.</p>
<p><a href="http://www.how-to-css.com/demos/geocoding.zip"><img src="http://www.how-to-css.com/images/download.png" alt="download" /></a></p>
<img src="http://feeds.feedburner.com/~r/HowToCss/~4/P-poSfO99D0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how-to-css.com/php/geocoding-with-jquery-php-and-google-maps/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.how-to-css.com/php/geocoding-with-jquery-php-and-google-maps/</feedburner:origLink></item>
		<item>
		<title>CSS Typography - the basics</title>
		<link>http://feedproxy.google.com/~r/HowToCss/~3/le69vLQnb6s/</link>
		<comments>http://www.how-to-css.com/css/css-typography-the-basics/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 01:26:27 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[letter-spacing]]></category>

		<category><![CDATA[line-height]]></category>

		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://www.how-to-css.com/?p=82</guid>
		<description><![CDATA[Typography is great, it can really make or break a project. Unfortunately, with websites you lose the ability to use a lot of font that can have a lot of impact. Only you can decide what works and what doesn&#8217;t for your project, but here are a few suggestions
Line-height
Line height in CSS is the equivalent [...]]]></description>
			<content:encoded><![CDATA[<p>Typography is great, it can really make or break a project. Unfortunately, with websites you lose the ability to use a lot of font that can have a lot of impact. Only you can decide what works and what doesn&#8217;t for your project, but here are a few suggestions</p>
<h3>Line-height</h3>
<p>Line height in CSS is the equivalent to leading in desktop publishing or graphics programs like InDesign or Illustrator. My personal preference is having a line-height equal to 1 and a half times the height of the font. I used to do it the hard way, set my height to something like 12px or 1.2em and then set my line-height to 18px or 1.8em. But if you change the font-size you have to change the line-height too. So, instead, set the line-height to a percentage. For most paragraph text, I set the line-height to 150%.</p>
<p>
<code>p {font-size: 12px; line-height: 150%; font-family: Tahoma, Verdana, Arial, Sans-Serif;}</code></p>
<h3>Letter Spacing</h3>
<p>Letter Spacing can be a pretty easy way to make your headlines a little better looking. Letter spacing is like the equivalent to kerning.</p>
<p>It&#8217;s my experience that using a letter-spacing of -1 looks really good for Verdana headlines of 14px or more.</p>
<p>
<code>h1 {font-size: 16px; font-color: #f00; font-family: Verdana, Arial, Sans-Serif; letter-spacing: -1px;}</code></p>
<p>Letter spacing can also be used to increase the distance between letters for typographical elements, instead of using a negative number, use a positive one.</p>
<h3>Font Choices</h3>
<p>There are a pretty good number of font choices that are considered safe, of course Vista came out and introduced a bunch of fonts like Cambria and crap I don&#8217;t know about because I haven&#8217;t used Vista. But font-families help provide something for everyone. You declare your fonts in the order of preference. You probably already know how this works. Unfortunately I haven&#8217;t compiled a list of substitute fonts yet, but once I get a naked install of Vista (one without any type of creative suite that would add fonts) I want to create a list.</p>
<p>All I can really tell you is reading on a monitor isn&#8217;t like reading on a sheet of paper. On paper, serif fonts work because letters take up equal space, but on a screen, it&#8217;s easier to read sans-serif fonts because the little tails can cause eye strain. Basically, for print you hear sans-serif for headlines, serif for body. On the web, you&#8217;ll hear sans-serif for body, serif for headline. Of course these are suggestions, nothing is written in stone (you&#8217;ll see verdana - with -1px letter-spacing for my headlines here). I also think serif body fonts work well on grungy style web-sites. Sans-serif fonts look too clean sometimes for grunge.</p>
<h3>More</h3>
<p>Of course there is more, line font-weight, font-style, etc. Maybe I&#8217;ll come back and append this post when I get some more time.</p>
<img src="http://feeds.feedburner.com/~r/HowToCss/~4/le69vLQnb6s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.how-to-css.com/css/css-typography-the-basics/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.how-to-css.com/css/css-typography-the-basics/</feedburner:origLink></item>
	</channel>
</rss>
