<?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>Three Styles &#187; CSS</title> <atom:link href="http://www.threestyles.com/topics/css/feed/" rel="self" type="application/rss+xml" /><link>http://www.threestyles.com</link> <description>Tutorials and Resources for Web Designers</description> <lastBuildDate>Wed, 14 Jul 2010 12:29:37 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>Lets Get Inspired &#8211; Top 10 CSS Galleries of 2010</title><link>http://www.threestyles.com/css/top-10-css-galleries-of-2010/</link> <comments>http://www.threestyles.com/css/top-10-css-galleries-of-2010/#comments</comments> <pubDate>Mon, 24 May 2010 16:02:04 +0000</pubDate> <dc:creator>Shane Jeffers</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[CSS gallery]]></category> <category><![CDATA[top 10 CSS galleries]]></category> <category><![CDATA[web designer inspiration]]></category> <category><![CDATA[web inspiration]]></category><guid
isPermaLink="false">http://www.threestyles.com/?p=1621</guid> <description><![CDATA[As designers and developers we should always be looking to increase our skills and creativity. A great way to keep motivated and push yourself as a designer is to look at outstanding work by others. I don&#8217;t know about you, but when I see an awesome site I want to inspect it and figure out [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.threestyles.com/css/top-10-css-galleries-of-2010/"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/inspired.jpg" alt="Lets Get Inspired - Top 10 CSS Galleries of 2010" title="Lets Get Inspired - Top 10 CSS Galleries of 2010" width="540" height="250" class="alignnone size-full wp-image-1647" /></a></p><p></p><p>As designers and developers we should always be looking to increase our skills and creativity.  A great way to keep motivated and push yourself as a designer is to look at outstanding work by others.  I don&#8217;t  know about you, but when I see an awesome site I want to inspect it and figure out what they did or study it visually to see exactly why it&#8217;s effective.  This helps me become a more well rounded designer and constantly keeps me on my toes.</p><p><span
id="more-1621"></span></p><p>Smashing Magazine issued a challenge for 2010 called <a
href="http://www.smashingmagazine.com/2009/12/22/design-something-every-day/" target="_blank">Design Something Every Day</a>.  Could you imagine how much your design skills would improve if you designed something every day?  Another way I find inspiration is through looking at other peoples work.  Enter the <strong>CSS Gallery</strong>.  Here are my top 10 galleries that I visit most often.  These sites are listed in NO particular order.</p><h2>1. <a
href="http://thecssawards.com">CSS Awards</a></h2><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/1_CSS.jpg" rel="wp-prettyPhoto[g1621]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/1_CSS.jpg" alt="Top Ten CSS Galleries" title="The CSS Awards" width="540" height="337" class="alignnone size-full wp-image-1629" /></a></p><p>The CSS Awards site is very busy, but I love the rating scale they use for the sites.  Some of the other galleries don&#8217;t get voted on by a panel of designers which is why I love this one!</p><h2>2. <a
href="http://siteinspire.net/">Site Inspire</a></h2><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/2_CSS.jpg" rel="wp-prettyPhoto[g1621]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/2_CSS.jpg" alt="Top 10 CSS Galleries" title="Siteinspire" width="540" height="378" class="alignnone size-full wp-image-1630" /></a></p><p>siteInspire is the exact opposite of #1.  It doesn&#8217;t have a public panel, or a real busy site, but it continually brings high quality inspiration to many designers around the world.</p><h2>3. <a
href="http://designshack.co.uk/">Designshack</a></h2><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/3_CSS.jpg" rel="wp-prettyPhoto[g1621]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/3_CSS.jpg" alt="Top 10 CSS Galleries" title="Design Shack" width="540" height="355" class="alignnone size-full wp-image-1631" /></a></p><p>Design Shack not only has a great CSS Gallery but they put together some awesome blog posts from various authors.  It also has a cool feature that allows you to search their gallery by color.</p><h2>4. <a
href="http://cssmania.com/">CSS Mania</a></h2><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/4_CSS.jpg" rel="wp-prettyPhoto[g1621]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/4_CSS.jpg" alt="Top 10 CSS Galleries" title="CSS Mania" width="540" height="382" class="alignnone size-full wp-image-1632" /></a></p><p>CSS Mania has been around for a while and it went through a branding change not to long ago.  I like CSS Mania because of the high quality work and it shows the color scheme of each selection.</p><h2>5. <a
href="http://cssdrive.com">CSS Drive</a></h2><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/5_CSS.jpg" rel="wp-prettyPhoto[g1621]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/5_CSS.jpg" alt="Top 10 CSS Galleries" title="CSS Drive" width="540" height="394" class="alignnone size-full wp-image-1633" /></a></p><p>CSS Drive also went through a re-branding process and completely revamped their website.  They did a good job on adding new features and keeping the overall experience of browsing the website pleasant.</p><h2>6. <a
href="http://bestwebgallery.com">Bestwebgallery</a></h2><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/6_CSS.jpg" rel="wp-prettyPhoto[g1621]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/6_CSS.jpg" alt="Top 10 CSS Galleries" title="Best Web Gallery" width="540" height="393" class="alignnone size-full wp-image-1634" /></a></p><p>Technically BestWebGallery isn&#8217;t just a gallery for CSS, but it&#8217;s still one I frequent because of the inspiration it offers.  It also gives you the ability to sort by tags such as CSS and Flash to narrow it down further.</p><h2>7. <a
href="http://cssremix.com">CSS Remix</a></h2><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/7_CSS.jpg" rel="wp-prettyPhoto[g1621]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/7_CSS.jpg" alt="Top 10 CSS Galleries" title="CSS Remix" width="540" height="416" class="alignnone size-full wp-image-1635" /></a></p><p>CSS Remix is about as simple as you  an get.  It&#8217;s a great site to bookmark if you need quick uninterrupted inspiration.</p><h2>8. <a
href="http://cssbeauty.com">CSS Beauty</a></h2><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/8_CSS.jpg" rel="wp-prettyPhoto[g1621]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/8_CSS.jpg" alt="Top 10 CSS Galleries" title="CSS Beauty" width="540" height="333" class="alignnone size-full wp-image-1636" /></a></p><p>CSS Beauty is another site that has great resources regarding CSS not just a gallery.  I recommend you spend some time on this one.</p><h2>9. <a
href="http://cssnature.org/">CSS Nature</a></h2><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/9_CSS.jpg" rel="wp-prettyPhoto[g1621]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/9_CSS.jpg" alt="Top 10 CSS Galleries" title="CSS Nature" width="540" height="343" class="alignnone size-full wp-image-1637" /></a></p><p>CSS Nature was actually a new one to me, but I was inspired by it&#8217;s layout and ease of use.</p><h2>10. <a
href="http://cssline.com">CSS Line</a></h2><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/10_CSS.jpg" rel="wp-prettyPhoto[g1621]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/10_CSS.jpg" alt="Top 10 CSS Galleries" title="CSS Line" width="540" height="357" class="alignnone size-full wp-image-1638" /></a></p><p>Looking at this logo alone inspires me to be a better designer.  Not to mention the high quality work they output.  This is also a new one to me but I&#8217;m glad I found it.</p><h2>Get Inspired</h2><p>Now you have 10 sites you can visit frequently so there is no excuse for a lack of inspiration.  It&#8217;s out there, now do your part and go seek it.  If galleries aren&#8217;t the way to go for you find something that is.  Take a walk around your neighborhood or local park.  Do something to get yourself inspired.</p><blockquote><p>“I write when I&#8217;m inspired, and I see to it that I&#8217;m inspired at nine o&#8217;clock every morning”<span
style="margin-left:20px;">Peter De Vries</span></p></blockquote> ]]></content:encoded> <wfw:commentRss>http://www.threestyles.com/css/top-10-css-galleries-of-2010/feed/</wfw:commentRss> <slash:comments>14</slash:comments> </item> <item><title>Create a Slick CSS3 Login Form NO IMAGES ALLOWED</title><link>http://www.threestyles.com/tutorials/css3-login-form-tutorial/</link> <comments>http://www.threestyles.com/tutorials/css3-login-form-tutorial/#comments</comments> <pubDate>Mon, 10 May 2010 12:46:47 +0000</pubDate> <dc:creator>Shane Jeffers</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[CSS3 Form Tutorial]]></category> <category><![CDATA[CSS3 Gradients]]></category> <category><![CDATA[CSS3 Login Form Tutorial]]></category> <category><![CDATA[CSS3 no images allowed]]></category><guid
isPermaLink="false">http://www.threestyles.com/?p=1575</guid> <description><![CDATA[The goal of this post is to harness some new functionality provided by CSS3 and move away from images. We are going to create a CSS3 login form without images yet still have a visually pleasing result. DEMO Writing the HTML First lets begin with creating the HTML markup that makes up the login form. [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.threestyles.com/tutorials/css3-login-form-tutorial/"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/css3-login.jpg" alt="Create a Slick CSS3 Login Form NO IMAGES ALLOWED" title="Create a Slick CSS3 Login Form NO IMAGES ALLOWED" width="540" height="250" class="alignnone size-full wp-image-1608" /></a><br
/></p><p>The goal of this post is to harness some new functionality provided by CSS3 and move away from images.  We are going to create a CSS3 login form without images yet still have a visually pleasing result.</p><p><span
id="more-1575"></span><br
/> <a
href="http://www.threestyles.com/CSS3-login-form.html" class="demo">DEMO</a></p><h1>Writing the HTML</h1><p>First lets begin with creating the HTML markup that makes up the login form.  Start with the basic HTML page as I will not include that portion in the code.</p><pre class="brush: xml;">
&lt;form&gt;
		&lt;label&gt;Username:&lt;/label&gt;
			&lt;input type=&quot;text&quot; name=&quot;username&quot; /&gt;
		&lt;label&gt;Password:&lt;/label&gt;
			&lt;input type=&quot;password&quot; name=&quot;password&quot;  /&gt;
			&lt;input type=&quot;submit&quot; value=&quot;Submit&quot; name=&quot;submit&quot; class=&quot;submit&quot; /&gt;
&lt;/form&gt;
</pre><p>This is the basic markup with a few labels and Input elements.  Now there are many different ways to markup the HTML you see above, but I tried to make it as simple as possible.  Make sure you add the Class SUBMIT to your button because it will require different styling.</p><h2>HTML Only Demo</h2><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/login1.jpg" rel="wp-prettyPhoto[g1575]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/login1.jpg" alt="CSS3 Login Form Tutorial" title="CSS3 Login Form Tutorial" width="540" height="150" class="alignnone size-full wp-image-1580" /></a></p><p>As you can see above we really need the power of CSS in order to give this login form some visual appeal. Enter CSS3!</p><h1>Writing the CSS</h1><p>It is now time to give this login form some life.  CSS3 has some really powerful new features and we will be covering only a few of them.  First lets get some of the basic layout styles down nothing having to do with CSS3</p><h2>Styling the Form Element</h2><p>We will begin writing our CSS targeting the form element as some of the other elements on the page will rely on the parent element. I&#8217;m going to go through the properties in logical order not in alphabetical order.  We want to set the width to 250px with 20px of padding on all sides and a 1px border also.</p><pre class="brush: css;">
form {
    width: 250px;
    padding: 20px;
    border: 1px solid #270644;
}
</pre><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/form2.jpg" rel="wp-prettyPhoto[g1575]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/form2.jpg" alt="" title="Form 2" width="540" height="250" class="alignnone size-full wp-image-1593" /></a></p><h2>Adding CSS3 to the Form Element</h2><p>Now lets add in the CSS3 magic to bring this form to life.</p><pre class="brush: css;">
form {
    width: 250px;
    padding: 20px;
    border: 1px solid #270644;

    /*** Adding in CSS3 ***/

    /*** Rounded Corners ***/
    -moz-border-radius: 20px;
    -webkit-border-radius: 20px;

    /*** Background Gradient - 2 declarations one for Firefox and one for Webkit ***/
    background:  -moz-linear-gradient(19% 75% 90deg,#4E0085, #963AD6);
    background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#963AD6), to(#4E0085));

    /*** Shadow behind the box ***/
    -moz-box-shadow:0px -5px 300px #270644;
    -webkit-box-shadow:0px -5px 300px #270644;
}
</pre><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/Form-3.jpg" rel="wp-prettyPhoto[g1575]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/Form-3.jpg" alt="" title="CSS3 Login Form" width="540" height="250" class="alignnone size-full wp-image-1595" /></a></p><h2>Styling the Input Elements</h2><p>Styling the input elements is pretty easy but it does have some complications that can frustrate.  We will apply a background color, a top border, some padding, and a width.</p><pre class="brush: css;">
input {
    width: 230px;
    background: #8a33c6;
    padding: 6px;
    margin-bottom: 10px;
    border-top: 1px solid #ad64e0;
    border-left: 0px;
    border-right: 0px;
    border-bottom: 0px;
}
</pre><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/Form-4.jpg" rel="wp-prettyPhoto[g1575]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/Form-4.jpg" alt="" title="CSS3 Login Form" width="540" height="250" class="alignnone size-full wp-image-1597" /></a></p><h2>Adding CSS3 to the Input Element</h2><p>For the input element we will implement the new features of CSS3 called transitions.  Unfortunately this only works in Webkit browsers such as Safari and Chrome.</p><pre class="brush: css;">
input {
    width: 230px;
    background: #8a33c6;
    padding: 6px;
    margin-bottom: 10px;
    border-top: 1px solid #ad64e0;
    border-left: 0px;
    border-right: 0px;
    border-bottom: 0px;

    /*** Adding CSS3 ***/

    /*** Transition Selectors - What properties to animate and how long ***/
    -webkit-transition-property: -webkit-box-shadow, background;
    -webkit-transition-duration: 0.25s;

    /*** Adding a small shadow ***/
    -moz-box-shadow: 0px 0px 2px #000;
    -webkit-box-shadow: 0px 0px 2px #000;
}
</pre><p>Now that we have the styles for the inputs in place lets style the hover events for those same inputs.</p><pre class="brush: css;">
input:hover {
    -webkit-box-shadow: 0px 0px 4px #000;
    background: #9d39e1;
}
</pre><p>Some of you may not have caught it but I increased the radius of the shadow on hover from 2px to 4px.  That is why we used the transition effects on the inputs because it triggers that change on hover.</p><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/Form-5.jpg" rel="wp-prettyPhoto[g1575]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/Form-5.jpg" alt="" title="Form 5" width="540" height="250" class="alignnone size-full wp-image-1599" /></a></p><h2>Styling the Button</h2><p>Ok we&#8217;re almost done, on to the button!  Since we gave our button the class SUBMIT we can use that selector in our CSS.</p><pre class="brush: css;">
input.submit {
    width: 100px;
    color: #fff;
    text-transform: uppercase;
    text-shadow: #000 1px 1px;
    border-top: 1px solid #ad64e0;
    margin-top: 10px;
}
</pre><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/Form-6.jpg" rel="wp-prettyPhoto[g1575]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/Form-6.jpg" alt="" title="Form 6" width="540" height="250" class="alignnone size-full wp-image-1601" /></a></p><h2>Adding CSS3 to the Submit Button</h2><pre class="brush: css;">
input.submit {
    width: 100px;
    color: #fff;
    text-transform: uppercase;
    text-shadow: #000 1px 1px;
    border-top: 1px solid #ad64e0;
    margin-top: 10px;

    /*** Adding CSS3 Gradients ***/
    background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#963AD6), to(#781bb9));
    background:  -moz-linear-gradient(19% 75% 90deg,#781bb9, #963AD6);
}
</pre><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/05/Form-8.jpg" rel="wp-prettyPhoto[g1575]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/05/Form-8.jpg" alt="" title="CSS3 Login Submit Button" width="540" height="250" class="alignnone size-full wp-image-1603" /></a></p><p>That&#8217;s it!  Now you have an awesome login form styled strictly with CSS3 and no images.  Of course it only works in webkit browsers currently which are Safari and Chrome, but CSS3 support will be coming to a browser near you soon.  If you liked this post please promote it below!</p><p><a
href="http://www.threestyles.com/CSS3-login-form.html" class="demo">FINAL DEMO</a></p> ]]></content:encoded> <wfw:commentRss>http://www.threestyles.com/tutorials/css3-login-form-tutorial/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Design and Code a Sweet Custom Coming Soon Page</title><link>http://www.threestyles.com/tutorials/design-and-code-custom-coming-soon-page/</link> <comments>http://www.threestyles.com/tutorials/design-and-code-custom-coming-soon-page/#comments</comments> <pubDate>Mon, 29 Mar 2010 06:34:44 +0000</pubDate> <dc:creator>Shane Jeffers</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Photoshop]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Design and Code a Sweet Custom Coming Soon Page]]></category> <category><![CDATA[design coming soon page tutorial]]></category> <category><![CDATA[design custom page tutorial]]></category><guid
isPermaLink="false">http://www.threestyles.com/?p=1430</guid> <description><![CDATA[So you just purchased a new hosting account and you some great ideas for your next project. Instead of just having the host default page up for your domain name why not create a coming soon page that is simple and effective. There are many reasons to create these coming soon pages. The first reason [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.threestyles.com/wp-content/uploads/2010/03/design.png" rel="wp-prettyPhoto[g1430]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/03/design.png" alt="Design and Code a Sweet Custom Coming Soon Page" title="Design and Code a Sweet Custom Coming Soon Page" width="540" height="250" class="alignnone size-full wp-image-1460" /></a><br
/></p><p>So you just purchased a new hosting account and you some great ideas for your next project.  Instead of just having the host default page up for your domain name why not create a coming soon page that is simple and effective.</p><p><span
id="more-1430"></span></p><p>There are many reasons to create these coming soon pages.  The first reason is to make your product or service look more professional instead of having the &#8220;This is a website&#8221; page that your hosting company provides you.  Secondly, it can help promote your site before it is even launched.   Be sure to include your twitter account or an email subscription so people can follow the progress of the site.  It allows them to get more excited about something they haven&#8217;t even seen yet.</p><h2>Example Screenshot</h2><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/03/final.png" rel="wp-prettyPhoto[g1430]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/03/final.png" alt="Final Screenshot" title="Final Screenshot" width="540" height="450" class="alignnone size-full wp-image-1463" /></a></p><h1>Designing the page</h1><p>When you start the design keep in the back of your head that this does not need to be a complex page on the contrary actually.  This page needs to be simple yet effective.  It must also convey a message of what the site will offer to get people interested.  Don&#8217;t spend too much time on this page as you need that time to complete your other ideas.  Let&#8217;s go ahead an open up photoshop and get started.</p><p>1.  Open up a photoshop document 900px by 700px with a transparent background and the settings below.</p><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/03/photoshop-settings.png" rel="wp-prettyPhoto[g1430]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/03/photoshop-settings.png" alt="Photoshop Document Settings" title="Photoshop Document Settings" width="540" height="333" class="alignnone size-full wp-image-1432" /></a></p><p>2.  Now lets fill in the background by going up to Edit > Fill.. chooser color from the drop down and put in the hex code #333333 and hit OK.</p><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/03/bgsettiongs.png" rel="wp-prettyPhoto[g1430]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/03/bgsettiongs.png" alt="Main Background Settings" title="Main Background Settings" width="540" height="524" class="alignnone size-full wp-image-1435" /></a></p><p>3.  Now select the rectangular marquee tool and in the drop down box at the top choose Fixed size.  Enter 900px for the width and 300px for the height.</p><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/03/900x300.png" rel="wp-prettyPhoto[g1430]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/03/900x300.png" alt="Rectangular Marquee Tool Settings" title="Rectangular Marquee Tool Settings" width="540" height="23" class="alignnone size-full wp-image-1437" /></a></p><p>4.  Before you click anywhere go up to Layer > New > Layer&#8230; and name it Top.  Now you can click anywhere in the document and make sure you drag the selection to the top.</p><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/03/top-selection.png" rel="wp-prettyPhoto[g1430]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/03/top-selection.png" alt="Top selection" title="Top selection" width="526" height="412" class="alignnone size-full wp-image-1438" /></a></p><p>5.  Make sure you are selected on the newly created layer not the dark layer and go up to Edit > Fill&#8230; choose color from the drop down and enter #ececec for the hex code.</p><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/03/top-fill.png" rel="wp-prettyPhoto[g1430]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/03/top-fill.png" alt="Fill top area with a color" title="Fill top area with a color" width="540" height="535" class="alignnone size-full wp-image-1440" /></a></p><p>6.  Now we have our top section put together all we have to do is bring in the logo.  Open up your logo and drag it into your document.  This is an important one because you want the brand to really stand out so make sure your logo is prevalent.</p><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/03/logo-added.png" rel="wp-prettyPhoto[g1430]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/03/logo-added.png" alt="Adding in the logo" title="Adding in the logo" width="540" height="413" class="alignnone size-full wp-image-1441" /></a></p><p>7.  Next we need to add in the COMING SOON portion so they know that the site is not just a broken site.  You don&#8217;t have to necessarily use COMING SOON, just something that lets the customer know that it&#8217;s not available yet.   First create another new layer by going to Layer > New > Layer&#8230; name it Shadow.   Grab your rectangular marquee tool and set a fixed size to be 400px wide and 30px high.  Click and make the selection directly underneath the logo.</p><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/03/shadow.png" rel="wp-prettyPhoto[g1430]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/03/shadow.png" alt="Shadow selection" title="Shadow selection" width="540" height="358" class="alignnone size-full wp-image-1443" /></a></p><p>8.  Grab your gradient tool and in the Gradient Picker (which is in the top left) choose your second option which should be foreground to transparent.  Also set your foreground color to black by pressing D on your keyboard.  Click approx. 5px above the selection that you have and while dragging down hold the shift key and let go when you get to about the middle of your selection.  Once that is done drop your opacity for this layer in your layers palette to  10%.</p><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/03/shadow-long.png" rel="wp-prettyPhoto[g1430]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/03/shadow-long.png" alt="Shadow Graphic" title="Shadow Graphic" width="540" height="406" class="alignnone size-full wp-image-1445" /></a></p><p>9.  Next we will use a layer mask to fade the corners out diagonally.  Go up to Layer > Layer Mask > Reveal All.  This allows us to see the complete layer and then fade it out by using the color black.  You should still have your gradient tool selected and Foreground to Transparent selected and black as your foreground color if not make sure you do.  Next drag the gradients below each of the corners in an upward diagonal direction like the screen shot below.</p><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/03/faded-corners.png" rel="wp-prettyPhoto[g1430]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/03/faded-corners.png" alt="Drag the gradient out" title="Drag the gradient out" width="540" height="406" class="alignnone size-full wp-image-1447" /></a></p><p>10.  Once that is finished go ahead and add the coming soon text in.</p><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/03/finished.png" rel="wp-prettyPhoto[g1430]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/03/finished.png" alt="Finished Top Section" title="Finished Top Section" width="459" height="421" class="alignnone size-full wp-image-1449" /></a></p><h1>Coding the page with CSS3</h1><p>I just recently did a post on <a
href="http://www.threestyles.com/tutorials/html5-rocks-my-socks-off/">The basics of HTML5</a> but today we are going to stick with XHTML and use the XHTML Strict DOCTYPE.</p><h2>The Basics</h2><p>11.  This is the bare bones of what an HTML page must consist of in order to display properly.  Add the code below to a blank HTML file and save it as index.html.</p><pre class="brush: xml;">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;
	&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
&lt;head&gt;
	&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;/&gt;
	&lt;title&gt;Alive Again Apparel&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre><p>12.  Next create a CSS file and name it style.css. Now lets link our CSS file to our index.html file so we don&#8217;t forget.  Add the piece of code below directly above the closing head tag.  Oh and to save you some trouble make sure the index file and the CSS file are in the same directory.</p><pre class="brush: css;">&lt;link href=&quot;style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;</pre><h2>The HTML Structure</h2><p>13.  Now let&#8217;s choose exactly how the page is going to be laid out.  We will be using a 100% width layout in this tutorial so we will need two divs for the top section.  One to fill the color 100% across and the other to center the content.  In the example below I took out all of the other tags except the body tags and what&#8217;s between them, but that was only to make it easier to see.  You still need the other tags in order for the page to work.</p><pre class="brush: xml;">
&lt;body&gt;
     &lt;div id=&quot;top&quot;&gt;
          &lt;div id=&quot;topcon&quot;&gt;
               &lt;img src=&quot;logo.png&quot; id=&quot;logo&quot; /&gt;
          &lt;div&gt;&lt;!-- This div will be centered and contain the logo --&gt;
     &lt;/div&gt;&lt;!-- 100% color all the way across --&gt;
     &lt;p&gt;Alive Again Apparel is a Christian T-Shirt business that is getting ready to launch. We will be delivering spirit filled T-Shirt designs for a unique way to spread the gospel.  

     &lt;p&gt;If you would like more information please feel free to email us at &lt;a href=&quot;#&quot;&gt;test@test.com&lt;/a&gt; or follow us on &lt;a href=&quot;#&quot; target=&quot;_blank&quot; id=&quot;twitter&quot;&gt;Twitter&lt;/a&gt; to get news about the upcoming launch.&lt;/p&gt;
&lt;/body&gt;
</pre><p>14.  Now we have our content and you guys should now have an html page that looks pretty boring with no styling at.  Enter CSS3!  Open up your CSS file and start with the code below.  I know how dare I say use this.  I recommend that you use some type of CSS reset instead of using this * method, but I used this for the sake of simplicity.</p><pre class="brush: css;">
/*** Resets all elements ***/

* {
   margin: 0px;
   padding: 0px;
}

/*** Gives the body the dark gray background we used in PS ***/

body { background: #333; }

/*** Styles the links ***/

a { color: #999; }

/*** Sets paragraph styles ***/

p {
   color: #ececec;
   font-family: verdana, arial;
   font-size: 12px;
   line-height: 18px;
   margin: 0px auto 20px auto;
   text-shadow: 1px 1px 1px #111; /*** New CSS3 Property that adds the shadow ***/
   width: 450px; /*** Allows paragraphs to be centered ***/
}
</pre><p>I used the Text-Shadow property right here which is brand new in CSS3.  It gives our text a nice shadow behind it in most modern browsers.</p><p><a
href="http://www.threestyles.com/wp-content/uploads/2010/03/text.png" rel="wp-prettyPhoto[g1430]"><img
src="http://www.threestyles.com/wp-content/uploads/2010/03/text.png" alt="CSS3 Text Shadow Property Example" title="CSS3 Text Shadow Property Example" width="540" height="245" class="alignnone size-full wp-image-1457" /></a></p><p>15.  Now that we&#8217;ve styled some of our HTML elements lets move on to the layout.</p><pre class="brush: css;">
/*** Top section 100% color ***/

#top {
   background: #ececec;
   border-bottom: 1px solid #fff;
   margin-bottom: 30px;
   width: 100%;
}

/*** Topcon centers the page at 900px ***/

#topcon {
   margin: 0px auto; /*** Centers the page ***/
   width: 900px; /*** A width is required in order for it to center ***/
}
</pre><p>16.  Notice in the HTML above I added ID&#8217;s to the twitter text and the logo.  We will use these specific ID&#8217;s to style them</p><pre class="brush: css;">
/*** Styling the Logo ***/

#logo {
   width:445px;
   height: 125px;
   display: block;
   margin: 0px auto; /*** Centers the logo in the 900px box ***/
   padding: 100px 0px;
}

/*** Styles the twitter link ***/

a#twitter { color: #4ce6fd; }
</pre><p><a
href="http://www.aliveagainapparel.com" target="_blank" style="background: #333; padding: 10px 20px; display:block;">LIVE DEMO</a></p><h1>The Final Product and Plug <img
src='http://www.threestyles.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></h1><p>If you hadn&#8217;t guessed already Alive Again Apparel is a <a
href="http://www.aliveagainapparel.com" target="_blank">Christian T-Shirt</a> Business I am starting and I wanted to walk you through my process of creating a coming soon page that can be seen <a
href="http://www.aliveagainapparel.com" target="_blank">here.</a></p><p>Please keep a look out for the launch of www.aliveagainapparel.com and be sure to follow me us on twitter to keep up to date with the progress <a
href="http://www.twitter.com/AliveAgainApprl" target="_blank">@AliveAgainApprl</a></p> ]]></content:encoded> <wfw:commentRss>http://www.threestyles.com/tutorials/design-and-code-custom-coming-soon-page/feed/</wfw:commentRss> <slash:comments>17</slash:comments> </item> <item><title>The Ultimate Guide to CSS Typography</title><link>http://www.threestyles.com/tutorials/css-tips-for-better-typography/</link> <comments>http://www.threestyles.com/tutorials/css-tips-for-better-typography/#comments</comments> <pubDate>Wed, 13 Jan 2010 15:18:08 +0000</pubDate> <dc:creator>Shane Jeffers</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[CSS font attributes]]></category> <category><![CDATA[CSS typography tips]]></category> <category><![CDATA[CSS3 and Fonts]]></category> <category><![CDATA[CSS3 and typography]]></category> <category><![CDATA[great looking typography]]></category> <category><![CDATA[the font attribute]]></category> <category><![CDATA[typography on the web]]></category><guid
isPermaLink="false">http://www.threestyles.com/?p=993</guid> <description><![CDATA[Typography is often overlooked in todays design specifically by web developers. It really is a shame because CSS gives us so much control over our type. That being said, we our limited to certain &#8220;web safe&#8221; typefaces but that shouldn&#8217;t decrease our creativity. Here are a few CSS tips for typography on the web. The [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.threestyles.com/tutorials/css-tips-for-better-typography/"><img
src="http://www.threestyles.com/wp-content/uploads/2010/01/main2.png" alt="" title="Ultimate Guide to text" width="540" height="250" class="alignnone size-full wp-image-1198" /></a></p><p></p><p>Typography is often overlooked in todays design specifically by web developers.  It really is a shame because CSS gives us so much control over our type.  That being said, we our limited to certain &#8220;web safe&#8221; typefaces but that shouldn&#8217;t decrease our creativity.  Here are a few CSS tips for typography on the web.</p><p><span
id="more-993"></span></p><h1>The Font Attribute</h1><p>CSS provides us with the Font attribute, which is what allows us to tweak the text on our page.  This is an overview of the syntax and how to effect text using CSS.</p><h2 style="margin-top: 30px;">Font-size</h2><p
style="margin-top: 0px;">Change the size of your font using <em>font-size</em></p><pre class="brush: css;">
     font-size: 1.2em;
     font-size: 12px;
     font-size: 10pt;
</pre><h5 style="margin-top: 10px;">Live Preview</h5><ol
style="background: #f5f5f5; padding: 20px 0px 20px 30px; border: 1px solid #ddd;"><li
style="font-size: 1.2em;">Font size is set to 1.2em.</li><li
style="font-size: 12px;">Font size is set to 12px.</li><li
style="font-size: 10pt;">Font size is set to 10pt.</li></ol><h2 style="margin-top: 30px;">Font-weight</h2><p
style="margin-top: 0px;">This is used to change the weight of your font (i.e bold, bolder)</p><pre class="brush: css;">
     font-weight: normal;
     font-weight: bold;
     font-weight: bolder;
     font-weight: lighter;
</pre><h5>Live Preview</h5><ol
style="background: #f5f5f5; padding: 20px 0px 20px 30px; border: 1px solid #ddd;"><li
style="font-weight: normal;">Font weight is set to normal</li><li
style="font-weight: bold;">Font weight is set to bold</li><li
style="font-weight: bolder;"><strong>Font weight is set to bolder</strong></li><li
style="font-weight: lighter;"><strong>Font weight is set to lighter</strong></li></ol><h2 style="margin-top: 30px;">Text-transform</h2><p
style="margin-top: 0px;">The text-transform property allows you to apply uppercase, lowercase, and capitalize effects to your text.</p><pre class="brush: css;">
     text-transform: capitalize;
     text-transform: uppercase;
     text-transform: lowercase;
     text-transform: inherit;
</pre><h5>Live Preview</h5><ol
style="background: #f5f5f5; padding: 20px 0px 20px 30px; border: 1px solid #ddd;"><li
style="text-transform: capitalize;">Capitalizes the first letter in every word</li><li
style="text-transform: uppercase;">Allows your html to be lower case the converts it all to uppercase characters</li><li
style="text-transform: lowercase;">ALLOWS YOUR HTML TO BE UPPERCASE THEN CONVERTS IT TO LOWERCASE, THIS WAS TYPED IN ALLCAPS</li><li
style="text-transform: inherit;">inherits the text-transform property from its parent element</li></ol><h2 style="margin-top: 30px;">Text-decoration</h2><p
style="margin-top: 0px;">The text-decoration property allows you to underline, overline and put a line through your text</p><pre class="brush: css;">
     text-decoration: normal;
     text-decoration: underline;
     text-decoration: overline;
     text-decoration: line-through;
     text-decoration: blink; (DO NOT USE)
</pre><h5>Live Preview</h5><ol
style="background: #f5f5f5; padding: 20px 0px 20px 30px; border: 1px solid #ddd;"><li
style="text-decoration: normal;">Text decoration set to normal</li><li
style="text-decoration: underline;">Text decoration set to underline</li><li
style="text-decoration: overline;">Text decoration set to overline</li><li
style="text-decoration: line-through;">Text decoration set to line-through</li><li
style="text-decoration: blink;">Text decoration set to blink ( Only works in Firefox and Opera )</li></ol><h2 style="margin-top: 30px;">Font-Variant</h2><p
style="margin-top: 0px;">The Font variant property allows you to create the small-caps effect which capitalizes the letters then decreases the font size.</p><pre class="brush: css;">
     font-variant: normal;
     font-variant: small-caps;
     font-variant: inherit;
</pre><h5>Live Preview</h5><ol
style="background: #f5f5f5; padding: 20px 0px 20px 30px; border: 1px solid #ddd;"><li
style="font-variant: normal;">Font Variant set to normal</li><li
style="font-variant: small-caps;">Font Variant set to small-caps</li><li
style="font-variant: inherit;">Font variant set to inherit</li></ol><h1>Creating Drop Caps</h1><p
style="margin-top: 0px;">Creating drop caps is easy with CSS.  There are multiple ways to create the drop cap effect but I am going to show the most efficient way.  To create them use the :first-letter pseudo-element which only effects the first character of a given element.</p><pre class="brush: xml;">&lt;p class=&quot;dropcaps&quot;&gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.&lt;/p&gt;</pre><pre class="brush: css;">
p.dropcaps:first-letter {
      	font-size: 340%;
	margin: 8px 5px 0px 0px;
	float: left;
	font-weight: bold;
	width: 1em;
}
</pre><p
class="dropcaps">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#8217;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p><h1>Creating Attractive Paragraphs</h1><p
style="margin-top:0px;">For more attractive paragraphs use Robert Bringhurst’s method which states: Take your font size and multiply it by 30 to get the width of your paragraphs.</p><p>For example if your font size is 12px, multiply it by 30 and you get 360px which should get you approximately 65 characters per line.</p><h2>Incorrect Measure</h2><p
style="font-size: 12px; width: 200px; margin-top: 5px;"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#8217;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p><h2>Correct Measure</h2><p
style="font-size: 12px; width: 400px; margin-top: 5px;"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#8217;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p><h1>Line-height Examples</h1><p
style="margin-top:0px;">Line height dictates the amount of space in between each line of text.  A good rule of thumb is to make the line height 6-7px bigger than your font-size.</p><p>For example if your font size is 12px, add 6px to the font size and you get your line height, which would be 18px.</p><h2>Incorrect Line-Height</h2><p
style="font-size: 12px; width: 400px; margin-top: 5px; line-height: 12px;"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#8217;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p><h2>Correct Line-Height</h2><p
style="font-size: 12px; width: 400px; margin-top: 5px; line-height: 18px;"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#8217;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p><h1>Cleanly Emphasize Text</h1><p
style="margin-top:0px;">Underlines should only be used on text that is linking to something or somewhere.  Italicizing text is a cleaner alternative.</p><h2>Incorrect example</h2><p
style="font-size: 12px; width: 400px; margin-top: 5px;"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#8217;s standard dummy text ever since the 1500s, when an <strong>unknown printer</strong> took a galley of type and scrambled it to make a type specimen book. It has survived not only <strong>five centuries</strong>, but also the leap into <strong>electronic typesetting</strong>, remaining essentially unchanged.</p><h2>Correct example</h2><p
style="font-size: 12px; width: 400px; margin-top: 5px;"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#8217;s standard dummy text ever since the 1500s, when an <em>unknown printer</em> took a galley of type and scrambled it to make a type specimen book. It has survived not only <em>five centuries</em>, but also the leap into <em>electronic typesetting</em>, remaining essentially unchanged.</p><h1>Looking forward &#8211; CSS3</h1><p>There are already some exciting features that you can incorporate into your designs dealing with type in CSS3. Of course some of these new features do not work in IE, but your probably used to nothing working in IE anyway so give these a shot.</p><h2>@Font-face</h2><p><em>@font-face</em> allows you to upload a raw font file to your web server and link to it in your external CSS file, then apply it to any type on your site.</p><p>This feature is the biggest one dealing with type, but along with it&#8217;s upside comes its downside.  There are only a few fonts that you are &#8220;allowed&#8221; to use because of licensing issues. The fonts that are <a
href="http://webfonts.info/wiki/index.php?title=Fonts_available_for_%40font-face_embedding" target="_blank">CSS3 safe can be found here</a>.</p><h3>Usage of @font-face</h3><p>In this example I put a folder in the root of my server called <em>font</em>.  First you need to declare the @font-face attribute which imports your font file and then you can use the font name to effect any other elements.</p><pre class="brush: css;">
/* Declaring the font */

@font-face {
      src: (font/diavlo.otf)
}

/* Applying the font to an element */

h1 {
      font-family:  diavlo, Arial;
}
</pre><h2>Text-Shadow</h2><p>The text shadow attribute takes away the need to create drop shadows for certain elements in photoshop and gives you dynamic drop shadow control. Of course this attribute is only supported in Safari, Chrome, Firefox and Opera.</p><p
style="font-size: 2em; font-weight: bold; color: #777; text-shadow: 1px 1px 1px #222;">Example Heading</p><pre class="brush: css;">

p {
      font-size: 2em;
      font-weight: bold;
      color: #777;
      text-shadow: 1px 1px 1px #222;
}
</pre><p
style="font-size: 2em; font-weight: bold; color: #777; text-shadow: 2px 2px 2px #222; margin-top: 35px;">Example Heading 2</p><pre class="brush: css;">

p {
      text-shadow: 2px 2px 2px #222;
}
</pre><p
style="font-size: 2em; font-weight: bold; color: #FFF; text-shadow: 1px 1px 5px #222; margin-top: 35px;">Example Heading 3</p><pre class="brush: css;">

p {
      text-shadow: 1px 1px 5px #FFF;
}
</pre><h1>The Challenge</h1><p>The techniques in this article are just guidelines. Take them and implement the features you like into your web designs. Typography is extremely important and can absolutely ruin a beautiful design.  Don&#8217;t let that happen to you bookmark this guide!</p> ]]></content:encoded> <wfw:commentRss>http://www.threestyles.com/tutorials/css-tips-for-better-typography/feed/</wfw:commentRss> <slash:comments>48</slash:comments> </item> <item><title>CSS&#8217;s Border Attribute &#8211; Usage and Best Practices</title><link>http://www.threestyles.com/tutorials/csss-border-attribute-usage-and-best-practices/</link> <comments>http://www.threestyles.com/tutorials/csss-border-attribute-usage-and-best-practices/#comments</comments> <pubDate>Mon, 16 Nov 2009 16:42:58 +0000</pubDate> <dc:creator>Shane Jeffers</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[border attribute]]></category> <category><![CDATA[border html]]></category> <category><![CDATA[borders in web design]]></category> <category><![CDATA[css border tutorial]]></category> <category><![CDATA[css tutorial]]></category><guid
isPermaLink="false">http://www.threestyles.com/?p=911</guid> <description><![CDATA[This is the second part in a three part series. Today we will be covering the Border attribute. The first article was on the Background Attribute and the last article will be on the Font Attribute so stay tuned and subscribe. Part one of this CSS series is linked below. In-Depth Look at CSS&#8217;s Background [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.threestyles.com/wp-content/uploads/2009/11/bordermain.png" alt="bordermain" title="bordermain" width="550" height="250" class="alignright size-full wp-image-943" style="border: 1px solid #999; padding: 0px;"/></p><p>This is the <em>second</em> part in a three part series. Today we will be covering the <em>Border attribute</em>.  The first article was on the <em>Background Attribute</em> and the last article will be on the <em>Font Attribute</em> so stay tuned and subscribe.  Part one of this CSS series is linked below.<br
/> <span
id="more-911"></span></p><ol
style="margin-left: 30px; line-height: 28px; margin-top: 5px;"><li><a
href="http://www.threestyles.com/tutorials/an-in-depth-look-into-csss-background-attribute/" target="_blank">In-Depth Look at CSS&#8217;s Background Attribute</a></li></ol><p></p><h2 style="color: #2bb7da;">Some background on the Border Attribute</h2><p>Borders used to be those ugly gray things that surrounded elements such as tables and frames, but now with CSS they are a very powerful tool for designers.</p><h2 style="color: #2bb7da;">Overview</h2><p>There are 3 properties available in CSS2 relating to the border attribute.</p><ul
style="margin-left: 30px; line-height: 28px; margin-top: 5px;"><li><strong>border-color :</strong> Sets the actual color for the border</li><li><strong>border-style :</strong> Sets the style of the border</li><li><strong>border-width :</strong> Sets how thick the border will be</li></ul><h2 style="color: #2bb7da;">Usage of basic properties</h2><h3  style="margin-top: 10px;"><i>Border Color</i></h3><p>The <strong>border-color</strong> property sets a specific color for the border of the chosen element.  Here are some examples of what this property may look like.</p><pre class="brush: css;">
border-color: #999;
border-color: rgb(100,200,200);
border-color: red;
border-color: transparent;
</pre><p><img
src="http://www.threestyles.com/wp-content/uploads/2009/11/border1.jpg" alt="Border Color Example" title="Border Color Example" width="537" height="136" class="alignright size-full wp-image-917" style="border: 1px solid #999;"/></p><h3 style="margin-top: 20px;"><i>Border Styles</i></h3><p>The <strong>border-style</strong> property sets the style of the border on the specified element to whatever value it&#8217;s given.</p><pre class="brush: css;">
border-style: dotted;
border-style: dashed;
border-style: solid;
border-style: double;
border-style: groove;
border-style: ridge;
border-style: inset;
border-style: outset;
border-style: none;
border-style: hidden;
</pre><p><img
src="http://www.threestyles.com/wp-content/uploads/2009/11/border2.png" alt="Border Style Example" title="Border Style Example" width="537" height="147" class="alignright size-full wp-image-926"  style="border: 1px solid #999;"/></p><h3 style="margin-top: 10px;"><i>Border Width</i></h3><p>The <strong>border-width</strong> property determines the thickness of the border on any given element.</p><pre class="brush: css;">
border: 3px solid #64c8c8;
border: .5em solid #64c8c8;
border: thin solid #64c8c8;
border: 10pt solid #64c8c8;
</pre><p><img
src="http://www.threestyles.com/wp-content/uploads/2009/11/border3.png" alt="Border Width Example" title="Border Width Example" width="353" height="226" class="alignright size-full wp-image-931" style="border: 1px solid #999;"/></p><h3 style="margin-top: 20px;"><i>Speed up the process with short hand</i></h3><p>This little piece of code is a gem, you might want to take notes on this one.  This combines all three border properties into one for increased productivity.</p><pre class="brush: css;">
border: (width) (style) (color);
border: 1px solid #999;
</pre><h2 style="color: #2bb7da;">Great Examples of Border Usage</h2><h3 style="margin-top: 20px;">1. <a
href="http://www.kammeradvokaten.dk/" target="_blank">Kammeradvokaten</a></h3><p><img
src="http://www.threestyles.com/wp-content/uploads/2009/11/border4.jpg" alt="border4" title="border4" width="550" height="316" class="alignright size-full wp-image-934" style="border: 1px solid #999;"/><br
/> <img
src="http://www.threestyles.com/wp-content/uploads/2009/11/border5.jpg" alt="border5" title="border5" width="550" height="625" class="alignright size-full wp-image-935" style="border: 1px solid #999;"/></p><p>This site uses a mixture of typography and borders to bring a truly effective simplistic look.  The borders act as organizers for the content.  Very well done.</p><h3 style="margin-top: 20px;">2. <a
href="http://www.open-comms.com/" target="_blank">Open</a></h3><p><img
src="http://www.threestyles.com/wp-content/uploads/2009/11/border6.jpg" alt="border6" title="border6" width="550" height="365" class="alignright size-full wp-image-940" style="border: 1px solid #999;"/><br
/> <img
src="http://www.threestyles.com/wp-content/uploads/2009/11/border7.jpg" alt="border7" title="border7" width="550" height="297" class="alignright size-full wp-image-941" style="border: 1px solid #999;"/></p><p>This is also another beautiful example of the border attribute.  Open has used borders to basically section off each piece of content.  Everything is well aligned and they used multiple styles of borders.</p><h2 style="color: #2bb7da;">My challenge to you</h2><p>When you are designing that new portfolio or a site for a client, push yourself to incorporate borders in the design.  It will not only be a challenge to do it well, but you as a designer will benefit from branching out from the norm.  If you do complete this challenge or have completed this challenge please leave a link in a comment so our readers can check them out!</p> ]]></content:encoded> <wfw:commentRss>http://www.threestyles.com/tutorials/csss-border-attribute-usage-and-best-practices/feed/</wfw:commentRss> <slash:comments>11</slash:comments> </item> <item><title>An In-Depth Look into CSS&#8217;s Background Attribute</title><link>http://www.threestyles.com/tutorials/an-in-depth-look-into-csss-background-attribute/</link> <comments>http://www.threestyles.com/tutorials/an-in-depth-look-into-csss-background-attribute/#comments</comments> <pubDate>Mon, 26 Oct 2009 13:28:19 +0000</pubDate> <dc:creator>Shane Jeffers</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[CSS Attributes]]></category> <category><![CDATA[CSS background attribute]]></category> <category><![CDATA[CSS beginners tutorial]]></category> <category><![CDATA[CSS properties]]></category> <category><![CDATA[css tutorial]]></category><guid
isPermaLink="false">http://www.threestyles.com/?p=717</guid> <description><![CDATA[This is the first part in a three part series. Today we will be covering the Background attribute. The second article will cover the border attribute, and finally the third article will cover the font attribute, so be sure to subscribe to catch the other two articles. A little bit of &#8220;Background&#8221; (* Pun Intended [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.threestyles.com/wp-content/uploads/2009/10/bgatt.png" alt="bgatt" title="bgatt" width="575" height="250" class="alignright size-full wp-image-783" style="border: 1px solid #888;padding:0px;" /></p><p
class="default">This is the first part in a <strong>three part series</strong>.  Today we will be covering the <strong>Background attribute</strong>. <strong>The second article will cover the border attribute</strong>, and finally the <strong>third article will cover the font attribute</strong>, so be sure to subscribe to catch the other two articles.</p><p><span
id="more-717"></span></p><h2 style="color: #2bb7da">A little bit of &#8220;Background&#8221; (* Pun Intended *)</h2><p
class="default">The Background attribute is probably the most frequently used attribute in CSS.  In this article we will cover the different properties that go with the background attribute, and how to use them correctly.  We will also have a showcase at the end of the article of sites that have used the attribute to it&#8217;s fullest potential.</p><h2 style="color: #2bb7da">Overview</h2><p
class="default">There are 5 properties available in CSS2 relating to the background attribute.</p><ul
style="margin-left: 25px"><li><strong>background-color :</strong> Set&#8217;s a solid background color to the given element</li><li><strong>background-image :</strong> Specifies an image to set as the background of an element</li><li><strong>background-position :</strong> Set&#8217;s the position of the image that was set</li><li><strong>background-repeat :</strong> Determines whether the image is tiled or not</li><li><strong>background-attachment :</strong> Specifies whether an image scrolls with the page or is in a fixed position</li></ul><h2 style="color: #2bb7da">Usage of basic properties</h2><h3 style="margin-top: 20px">Background Color</h3><p
class="default">The background-color property sets a solid color for an entire element.  Here are some of the different values you can use to define the desired color.</p><pre class="brush: css;">

background-color: #2bb7da;
background-color: red;
background-color: rgb(145, 100, 140);
background-color:  transparent;
</pre><p><img
src="http://www.threestyles.com/wp-content/uploads/2009/10/color2.jpg" alt="color2" title="color2" width="500" height="130" class="alignright size-full wp-image-753" style="border: 1px solid #888;"/></p><h3 style="margin-top: 20px">Background Image</h3><p
class="default">The background-image property specifies an image on the server or locally to place as the background of the specific element.</p><pre class="brush: css;">
background-image: url(path to image);

background-image: url(logo.png);
</pre><p><img
src="http://www.threestyles.com/wp-content/uploads/2009/10/image.jpg" alt="image" title="image" width="486" height="318" class="alignright size-full wp-image-756" style="border: 1px solid #888;"/></p><p
class="default">There is a huge <strong>advantage of using the background property</strong> to call in your images because it makes it harder for the &#8220;Average Joe&#8221; to take the pictures from your site.  For example if you place an image in an IMG tag in your html <strong>I can right-click it and save it</strong>, if you put it in your CSS using <strong>a div and the background image property</strong> then it would be much harder for me to get to that image.  So in other words it adds extra security to your images.</p><h3 style="margin-top: 20px">Background Position</h3><p
class="default">The background-position property specifies where your background image should be placed in your elements background.</p><pre class="brush: css;">
background-position: 50px -10px; /* Moves image to the right 50px and up 10px */
background-position: 0% 50%;
background-position: center center;
background-position: 0% 70%;
</pre><p><img
src="http://www.threestyles.com/wp-content/uploads/2009/10/position.jpg" alt="position" title="position" width="500" height="230" class="alignright size-full wp-image-759" style="border: 1px solid #888;" /></p><h3 style="margin-top: 20px">Background Repeat</h3><p
class="default">The background-repeat property specifies whether or not your background image tiles and if so how to tile.  This property should only be used in conjunction with the background-image property or it will have no effect.</p><pre class="brush: css;">
background-repeat: repeat; /* Default value for bg images */
background-repeat: repeat-y; /* Tiles image vertically */
background-repeat: repeat-x; /* Tiles image horizontally */
background-repeat: no-repeat; /* Stops tiling */
</pre><p><img
src="http://www.threestyles.com/wp-content/uploads/2009/10/repeat.jpg" alt="repeat" title="repeat" width="500" height="230" class="alignright size-full wp-image-762" style="border: 1px solid #888;" /></p><h3 style="margin-top: 20px">Background Attachment</h3><p
class="default">The background-attachment property is not one that  you see often in CSS code.  It defines whether the a background image scrolls with the page or stays in a fixed position when scrolling.</p><pre class="brush: css;">
background-image: url(logo.png);

background-repeat: no-repeat;
background-attachment: fixed;
</pre><h2 style="color: #2bb7da">Background Attribute Shorthand</h2><h3 style="margin-top: 20px;">Shorthand it!</h3><p
class="deafult">Instead of declaring each one of these properties seperately we can save a lot of time by using the shorthand for the background attribute.</p><pre class="brush: css;">
background: color image position attachment repeat;

background: #fff url(logo.png) 50px -10px scroll no-repeat;
</pre><h2 style="color: #2bb7da">Beautiful Uses of the Background Attribute</h2><p
class="default">Here are a few sites that have really nailed the use of background images in there web design.</p><h3 style="margin-top: 20px">Web Designer Wall</h3><p><img
src="http://www.threestyles.com/wp-content/uploads/2009/10/wdw.jpg" alt="wdw" title="wdw" width="575" height="301" class="alignright size-full wp-image-771" style="border: 1px solid #888;" /></p><p
class="default">Nick La creator of Web Designer Wall does an amazing job on his blog with background images.  He uses multiple background images to create an astonishing effect.</p><h3 style="margin-top: 20px">Web Designer Depot</h3><p><img
src="http://www.threestyles.com/wp-content/uploads/2009/10/wdd.jpg" alt="wdd" title="wdd" width="575" height="297" class="alignright size-full wp-image-774" style="border: 1px solid #888;"  /></p><p
class="default">Web Designer Depot also does an amazing job of using elaborate background images to enhance the user experience.</p><h3 style="margin-top: 20px">PSD Vibe</h3><p><img
src="http://www.threestyles.com/wp-content/uploads/2009/10/psdvibe.jpg" alt="psdvibe" title="psdvibe" width="575" height="292" class="alignright size-full wp-image-777" style="border: 1px solid #888;" /></p><p
class="default">PSD Vibe uses subtle background images that blend in with the solid background color of the site.</p><h3 style="margin-top: 20px">Thats All</h3><p
class="default">As web designers and developers we must learn to use the background attribute and all it&#8217;s properties to the fullest.  If you enjoyed this post please bump, re-tweet, moo, etc&#8230;</p> ]]></content:encoded> <wfw:commentRss>http://www.threestyles.com/tutorials/an-in-depth-look-into-csss-background-attribute/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>CSS Shorthand &#8211; A Guide to Cleaner and Faster Coding</title><link>http://www.threestyles.com/tutorials/css-shorthand-guide/</link> <comments>http://www.threestyles.com/tutorials/css-shorthand-guide/#comments</comments> <pubDate>Tue, 29 Sep 2009 15:45:13 +0000</pubDate> <dc:creator>Shane Jeffers</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[css guide]]></category> <category><![CDATA[css short hand guide]]></category> <category><![CDATA[css short hand tutorial]]></category> <category><![CDATA[css shorthand]]></category> <category><![CDATA[css shorthand tutorial]]></category> <category><![CDATA[css tutorial]]></category> <category><![CDATA[shorthand css guide]]></category><guid
isPermaLink="false">http://www.threestyles.com/?p=537</guid> <description><![CDATA[A Guide to Cleaner and Faster Coding As a web developer I am always looking for ways to speed up my workflow. One of the simplest ways to speed up and clean up your coding is to learn CSS Shorthand. In order to fully grasp shorthand, it is helpful to already have a decent knowledge [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.threestyles.com/wp-content/uploads/2009/09/csshorthand.png" alt="csshorthand" title="csshorthand" width="575" height="250" class="alignright size-full wp-image-572" style="border: 1px solid #555;" /></p><h2 style="margin-top:20px; border-bottom: 1px solid #ccc; padding-bottom: 10px;">A Guide to Cleaner and Faster Coding</h2><p
class="default">As a web developer I am always looking for ways to speed up my workflow.  One of the simplest ways to speed up and clean up your coding is to learn CSS Shorthand.  In order to fully grasp shorthand, it is helpful to already have a decent knowledge of CSS.  I have put together a simple guide to bring you into the world of CSS Shorthand.</p><p><span
id="more-537"></span></p><h2 style="margin-top:50px; border-bottom: 1px solid #ccc; padding-bottom: 10px;">CSS Syntax &#8211; The Basics</h2><p
class="default">The basic CSS syntax contains a minimum of three parts, a selector, a property and a value</p><pre class="brush: css;">
/* Basic Syntax */

selector { property: value }

/* Actual Example */

p { color: #444444; }
</pre><h2 style="margin-top:50px; border-bottom: 1px solid #ccc; padding-bottom: 10px;">Background Property &#8211; The <span
style="color: #2bb7da">Long</span> Way</h2><p
class="default">There are five properties for the background property, but coding all these out separately is a waste of time and space.</p><pre class="brush: css;">
#example {
      background-color: #cccccc;
      background-image: url(logo.png);
      background-repeat: no-repeat;
      background-position: 10px 10px;
      background-attachment: scroll;
}
</pre><h2 style="margin-top:50px; border-bottom: 1px solid #ccc; padding-bottom: 10px;">Background Property &#8211; The <span
style="color: #2bb7da">Short</span> Way</h2><p
class="default">Combining the five properties into one declaration will speed up your code and it will take up less space in your stylesheet.</p><pre class="brush: css;">
#example { background: #ccc url(logo.png) no-repeat 0px 0px fixed; }
</pre><h2 style="margin-top:50px;  border-bottom: 1px solid #ccc; padding-bottom: 10px;">Border Property &#8211; The <span
style="color: #2bb7da">Long</span> Way</h2><p>There are three properties for the border property which consist of the width of the border, the style and the color.</p><pre class="brush: css;">
#example {
      border-width: 2px;
      border-style: solid;
      border-color: #333;
}
</pre><h2 style="margin-top:50px;  border-bottom: 1px solid #ccc; padding-bottom: 10px;">Border Property &#8211; The <span
style="color: #2bb7da">Short</span> Way</h2><p
class="default">Combining these three attributes is one of the easiest to remember in my opinion, and since I use a lot of borders it saves me a lot of valuable time.</p><pre class="brush: css;">
#example {
      border: 1px solid #333;
}
</pre><h2 style="margin-top:50px;  border-bottom: 1px solid #ccc; padding-bottom: 10px;">Margin and Padding &#8211; The <span
style="color: #2bb7da">Long</span> Way</h2><p>Margin and padding have four possible properties each.</p><pre class="brush: css;">
/* Margin Example */

#example {
      margin-top: 5px;
      margin-right: 10px;
      margin-bottom: 10px;
      margin-left: 5px
}

/* Padding Example */

#example {
      padding-top: 5px;
      padding-right: 10px;
      padding-bottom: 10px;
      padding-left: 5px
}
</pre><h2 style="margin-top:50px;  border-bottom: 1px solid #ccc; padding-bottom: 10px;">Margin and Padding &#8211; The <span
style="color: #2bb7da">Short</span> Way</h2><p
class="default">It is easy to use shorthand for margin and padding.  All you have to remember is think clockwise just like a clock.  Start with top, then the right, then the bottom, and lastly the left.</p><pre class="brush: css;">
/* Margin Example */

#example {
      margin: 5px 10px 10px 5px;
}

/* Padding Example */

#example {
      padding: 5px 10px 10px 5px;
}
</pre><p
class="default">There is another way that padding and margin can be written and that is with just two values, the first value being top and bottom, and the second value being left and right.</p><pre class="brush: css;">
/* Margin Example */

#example {
      margin: 20px 0px;
}

/* Padding Example */

#example {
      padding: 10px 20px;
}
</pre><h2 style="margin-top:50px;  border-bottom: 1px solid #ccc; padding-bottom: 10px;">Colors in General</h2><p
class="default"> Throughout this tutorial I have been been short handing the color property  (I wonder if you noticed) and here is the correct syntax for that.  Any color values such as #333333 (dark gray), can be abbreviated to #333, because all of the values are the same.  If a value reads something like #2bb7da it cannot be abbreviated. Of course this is not a huge deal but when dealing with a big project every second counts.</p><pre class="brush: css;">
/* Long Example */

color: #333333

/* Short Example */

color: #333;
</pre><h2 style="margin-top:30px; border-bottom: 1px solid #ccc; padding-bottom: 10px;">That&#8217;s All Folks</h2><p
class="default" style="margin-bottom: 20px; "> Hopefully this guide has been helpful to you and will continue to be helpful in the future.  I will be sure to update this article as technology changes and CSS3 ushers it&#8217;s way into the foreground! By the way subscribe, retweet, digg, stumble, or bump if you enjoyed this guide!</p> ]]></content:encoded> <wfw:commentRss>http://www.threestyles.com/tutorials/css-shorthand-guide/feed/</wfw:commentRss> <slash:comments>19</slash:comments> </item> <item><title>Coding Apple&#8217;s Navigation Bar Using CSS Sprites</title><link>http://www.threestyles.com/tutorials/coding-apples-navigation-bar-using-css-sprites/</link> <comments>http://www.threestyles.com/tutorials/coding-apples-navigation-bar-using-css-sprites/#comments</comments> <pubDate>Sat, 12 Sep 2009 16:51:07 +0000</pubDate> <dc:creator>Shane Jeffers</dc:creator> <category><![CDATA[Apple Stuff]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Apple's Navigation CSS Sprite tutorial]]></category> <category><![CDATA[Coding Apple's Navigation Bar]]></category> <category><![CDATA[CSS Sprite tutorial]]></category> <category><![CDATA[Using CSS Sprites]]></category><guid
isPermaLink="false">http://www.threestyles.com/?p=420</guid> <description><![CDATA[Here is the follow up tutorial to my most recent tutorial on how to create Apple&#8217;s navigation bar in photoshop. This tutorial is not going to go in depth about all the benefits of sprites, but will show you how to use the technique correctly. Final Demo What are CSS Sprites, and why use them? [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.threestyles.com/tutorials/coding-apples-navigation-bar-using-css-sprites/" style="border: 0;"><img
src="http://www.threestyles.com/wp-content/uploads/2009/09/applebarcode.jpg" alt="applebarcode" title="applebarcode" width="575" height="250" class="alignright size-full wp-image-468"  /></a></p><p>Here is the follow up tutorial to my most recent tutorial on how to create Apple&#8217;s navigation bar in photoshop.  This tutorial is not going to go in depth about all the benefits of sprites, but will show you how to use the technique correctly.</p><p><span
id="more-420"></span></p><p
class="more-link"><a
href="http://www.threestyles.com/demo/apple-css-sprite.html" target="_blank">Final Demo</a></p><h1 style="margin-top:30px">What are CSS Sprites, and why use them?</h1><p
style="margin-top: 5px;">In lamens terms CSS Sprites are multiple images combined into one to reduce the amount http requests and server load time.  Have you ever used the hover attribute with a background image that shows up on hover?  Yep that&#8217;s right, when you hover over it for the first time there is a slight flicker, or moment where the image does not show.   This happens because the browser doesn&#8217;t load that image until the hover state, therefore causing a slight flicker the first time the image is hovered over.  CSS Sprites get rid of that flicker because instead of using two images and calling a separate image on hover you combine the two images into one and position it on hover.  This might sound a little confusing at first, but keep doing it and you will get it.</p><h1 style="margin-top:30px">Ok, Lets Get Started</h1><p><span
style="font-weight: bold">1.</span> <a
href="http://www.threestyles.com/wp-content/uploads/2009/09/nav.png" rel="wp-prettyPhoto[g420]">Click here</a> to download our starting image for this tutorial</p><p><span
style="font-weight: bold">2.</span> Create a new HTML file and a CSS file with your favorite editor.</p><h1 style="margin-top:30px">Setting up the HTML</h1><p>We are going to use an unordered list because they are great especially for navigation.  So create an unordered list like the one below.  You can see that we have an LI tag for each section on our navigation, this is very important.  You can also see that each LI tag has an ID assigned to it.  This is also very important because we will need to specify the width of each list item later.</p><pre class="brush: xml;">
	&lt;ul id=&quot;nav&quot;&gt;
	          &lt;li id=&quot;list1&quot;&gt;&lt;a href=&quot;#&quot;&gt;&lt;span&gt;Apple&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	          &lt;li id=&quot;list2&quot;&gt;&lt;a href=&quot;#&quot;&gt;&lt;span&gt;Store&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	          &lt;li id=&quot;list3&quot;&gt;&lt;a href=&quot;#&quot;&gt;&lt;span&gt;Mac&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	          &lt;li id=&quot;list4&quot;&gt;&lt;a href=&quot;#&quot;&gt;&lt;span&gt;iPod + iTunes&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	          &lt;li id=&quot;list5&quot;&gt;&lt;a href=&quot;#&quot;&gt;&lt;span&gt;iPhone&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	          &lt;li id=&quot;list6&quot;&gt;&lt;a href=&quot;#&quot;&gt;&lt;span&gt;Downloads&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	          &lt;li id=&quot;list7&quot;&gt;&lt;a href=&quot;#&quot;&gt;&lt;span&gt;Support&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
</pre><h4>That is all of the HTML code you will need for this technique, CSS takes care of the rest.</h4><h1 style="margin-top:30px">Setting up the CSS</h1><p>Ok first and foremost I am hoping you have already linked your style sheet to your HTML file, if not do so now.</p><p><span
style="font-weight: bold">3.</span> The first selector we will be working with is our Unordered list which we gave the ID of &#8220;nav.&#8221;  We are going to set our main image as the background of our unordered list.  Now, our images total height is 76px, but we only want half of the image to show at first correct?  Yes thats correct, because we do not want the bottom half of the picture to show up until one of the buttons on the nav is hovered over.  So we are setting the height of the Unordered list to 38 which is half of 76. Margin: 0 auto is just to center the Unordered list in your browser window that piece of code is not necessary.  Check out the code below</p><pre class="brush: css;">

* { margin: 0px; padding: 0px; }

#nav {
      background: url(nav.png);
      height: 38px;
      width: 876px;
      margin: 0 auto;
}

#nav span {
     display: none;
}
</pre><p><span
style="font-weight: bold">4.</span> Next we need to get the list items to be horizontal because that is the orientation of our navigation.  So we float the list items to the left so that they line up horizontally.  We also want to get rid of the bullets because they are just getting in the way!  The next step is to give a height to our anchor tags.  The anchor tags determine which part is going to be clickable which we are giving a height of 38px.  If we want all of those 38px to be clickable we have to use display: block.</p><pre class="brush: css;">
#nav li {
	list-style-type: none;
	float: left;
}

#nav a {
	height: 38px;
	display: block;
}
</pre><h1 style="margin-top:30px">It&#8217;s Measuring Time</h1><p><span
style="font-weight: bold">5.</span> Now we have to measure out exactly how wide each of the &#8220;buttons&#8221; on out navigation our, so lets head back to photoshop.  Open up nav.png and grab your ruler tool which is underneath your eyedropper tool and click on the very left edge of the document and drag to the dark middle separator between the second button. Make sure you ZOOM IN so you can be more accurate</p><p><a
href="http://www.threestyles.com/wp-content/uploads/2009/09/measure.jpg" rel="wp-prettyPhoto[g420]"><img
src="http://www.threestyles.com/wp-content/uploads/2009/09/measure.jpg" alt="measure" title="measure" width="493" height="324" class="alignright size-full wp-image-439" style="border:1px solid #444" /></a></p><p><span
style="font-weight: bold">6.</span> Repeat step five for each of the buttons until you get all the way to the other end.  If you measure correctly they should all add up to be 876px wide.  If yours do not match that width move on for now and you can change it later.  Now we have to get all of our selectors ready for each individual list item.</p><pre class="brush: css;">
#list1 { width: 112px; }
#list2 { width: 120px; }
#list3 { width: 128px; }
#list4 { width: 125px; }
#list5 { width: 137px; }
#list6 { width: 131px; }
#list7 { width: 123px; }
</pre><p><span
style="font-weight: bold">7.</span> Now that we have the widths set we need to position the rollover on hover.  So how do we do that?  We are going to use background positioning.  So we choose our first selector which is #list1, and we set the background image as our nav.png.  When using background positioning you have two choices move along the X-axis (horizontal) or the Y-axis (Vertical).  Since are rollover image is underneath our active state we need to shift the image up the Y-axis.  So how much do we shift it up?  Well since our image is split directly in two we can just use the same height as we set for our Unordered list which was 38px, but we need to use a NEGATIVE 38 because the negative makes it go up the Y-axis where as a positive 38 would shift it down.</p><pre class="brush: css;">
#list1 a:hover {
      background: url(nav.png) 0px -38px no-repeat;
}
</pre><p><span
style="font-weight: bold">8.</span> The -38px for the Y-axis will be the same on each one of the list items because we always want it to shift to the rollover section of our image, but the x-axis will change.  The x-axis in the example above is set to zero because it is all the way to the left.  So for the next list item we need to shift it over the amount of the previous list items width (Hopefully that makes sense).  So we go back and look at the width of the first list item, which we see is 112px so we add that as a negative number to our x-axis on #list2.</p><pre class="brush: css;">
#list2 a:hover {
      background: url(nav.png) -112px -38px no-repeat;
}
</pre><p
class="default"><span
style="font-weight: bold">9.</span> We keep repeating this process for the other 5 list items.  Just keep adding the previous widths so by the time you get to the end you should be adding six widths together.  Here is what it should look like complete.</p><pre class="brush: css;">
#list1 a:hover {
      background: url(nav.png) 0px -38px no-repeat;
}

#list2 a:hover {
      background: url(nav.png) -112px -38px no-repeat;
}

#list3 a:hover {
      background: url(nav.png) -232px -38px no-repeat;
}

#list4 a:hover {
      background: url(nav.png) -360px -38px no-repeat;
}

#list5 a:hover {
      background: url(nav.png) -485px -38px no-repeat;
}

#list6 a:hover {
      background: url(nav.png) -622px -38px no-repeat;
}

#list7 a:hover {
      background: url(nav.png) -753px -38px no-repeat;
}
</pre><h1 style="margin-top:30px">All Done!!</h1><p>If you have followed all of the steps I have laid out above you should have a beautiful Apple Navigation Bar coded using CSS Sprites.  If you have any questions please comment on this post.  Please subscribe to my blog if you enjoyed this post.  Thanks everyone</p><p
class="more-link"><a
href="http://www.threestyles.com/demo/apple-css-sprite.html" target="_blank">Final Demo</a></p> ]]></content:encoded> <wfw:commentRss>http://www.threestyles.com/tutorials/coding-apples-navigation-bar-using-css-sprites/feed/</wfw:commentRss> <slash:comments>44</slash:comments> </item> <item><title>5 CSS Dont&#8217;s for Beginners</title><link>http://www.threestyles.com/tutorials/5-css-donts-for-beginners/</link> <comments>http://www.threestyles.com/tutorials/5-css-donts-for-beginners/#comments</comments> <pubDate>Fri, 21 Aug 2009 19:45:32 +0000</pubDate> <dc:creator>Shane Jeffers</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[beginners CSS]]></category> <category><![CDATA[CSS dont's]]></category> <category><![CDATA[CSS Dont's for Beginners]]></category> <category><![CDATA[things not to do in CSS]]></category> <category><![CDATA[what not to do in CSS]]></category><guid
isPermaLink="false">http://www.threestyles.com/?p=135</guid> <description><![CDATA[There are plenty of CSS tutorials out there that are aimed to increase your knowledge of CSS so you can cut down on mistakes.  This tutorial is going to point out some obvious mistakes that beginners to CSS coding make, with the intention of helping you stop doing these techniques. 1. DO NOT overuse Classes [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://www.threestyles.com/tutorials/5-css-donts-for-beginners/"><img
src="http://www.threestyles.com/wp-content/uploads/2009/08/cssdonot1.jpg" alt="cssdonot" title="cssdonot" width="575" height="250" class="alignnone size-full wp-image-209" style="border: 1px solid #333"/></a></p><p><span
style="letter-spacing: 0.0px;">There are plenty of CSS tutorials out there that are aimed to increase your knowledge of CSS so you can cut down on mistakes.  This tutorial is going to point out some obvious mistakes that beginners to CSS coding make, with the intention of helping you stop doing these techniques.</span></p><p><span
id="more-135"></span></p><h2 style="margin-top:20px;"><span
style="letter-spacing: 0.0px;">1. DO NOT overuse Classes and ID’s</span></h2><p><span
style="letter-spacing: 0.0px;">Beginners seem to add classes and ID’s to almost every element on the page.  This is not necessary and can defeat the whole purpose of using CSS. The overuse of classes/ ID&#8217;s can not only clutter up your style sheet, but are unnecessary.  There are some examples below of what I am referring to.</span></p><h3 style="margin-top:20px;">Incorrect Example:</h3><div
id="codebg"><p>&lt;div id=&quot;container&quot; class=&quot;container&quot;&gt;<br
/> &nbsp;&nbsp;&lt;p class=&quot;heading&quot;&gt;&lt;strong class=&quot;extrastrong&quot;&gt;Welcome&lt;/strong&gt;&lt;/p&gt;<br
/> &nbsp;&nbsp;&lt;p class=&quot;link1&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;link&quot;&gt;Home&lt;/a&gt;&lt;/p&gt;<br
/> &nbsp;&nbsp;&lt;p class=&quot;link2&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;link&quot;&gt;About&lt;/a&gt;&lt;/p&gt;<br
/> &nbsp;&nbsp;&lt;p class=&quot;link3&quot;&gt;&lt;a href=&quot;#&quot;&gt; class=&quot;link&quot;Services&lt;/a&gt;&lt;/p&gt;<br
/> &nbsp;&nbsp;&lt;p class=&quot;link4&quot;&gt;&lt;a href=&quot;#&quot;&gt; class=&quot;link&quot;Contact&lt;/a&gt;&lt;/p&gt;<br
/> &lt;/div&gt;</p></div><p
style="margin-top:20px; font-weight: bold; font-style: italic;">Here is how to correct the code above</p><h3 style="margin-top:20px;">Correct Example:</h3><div
id="codebg"> &lt;div id=&quot;container&quot;&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;This is a heading&lt;/h1&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;#&quot;&gt;About&lt;/a&gt;&lt;/li&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Services&lt;/a&gt;&lt;/li&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;<br
/> &lt;/div&gt;</div><h2 style="margin-top:20px;"><span
style="letter-spacing: 0.0px;">2. DO NOT use inline styles</span></h2><p><span
style="letter-spacing: 0.0px;">Please do not use inline styles in your HTML markup.  The great advantage of CSS is being able to store style markup externally, and allowing it to be distributed to multiple pages.  Inline styles are a bad habit of the 90’s.  There are certainly circumstances that inline styles can be useful but certainly not in a final product of a website.</span></p><h3 style="margin-top:20px;">Incorrect Example:</h3><div
id="codebg"> &lt;p style=&quot;color: #fff; font-size: 2em;&quot;&gt;This is a sentence.&lt;/p&gt;</div><p
style="margin-top:20px; font-weight: bold; font-style: italic;">Here is how to correct the code above</p><h3 style="margin-top:20px;">Correct Example:</h3><div
id="codebg"> &lt;p&gt;This is a sentence.&lt;/p&gt;</div><div
id="codebg" style="margin-top: 10px;"> /*External Style Sheet*/<br
/> p { color: #fff; font-size: 2em; }</div><h2 style="margin-top:20px;"><span
style="letter-spacing: 0.0px;">3. DO NOT abuse absolute positioning</span></h2><p><span
style="letter-spacing: 0.0px;">Learn how to correctly use absolute positioning.   Every element on the page should not be absolutely positioned.  Learn how absolute positioning can be used effectively, because it is an important tool.  Visit W3Schools to learn more about <a
href="http://www.w3schools.com/Css/css_positioning.asp">absolute postioning</a>.</span></p><h2 style="margin-top:20px;"><span
style="letter-spacing: 0.0px;">4. DO NOT have messy invalid CSS</span></h2><p><span
style="letter-spacing: 0.0px;">There is nothing I hate more than a messy CSS file.  Keep it clean and validated to make it easier for other developers to debug.  You can use the W3C validator to validate your CSS.  Some programs such as TextMate for Mac and of course Dreamweaver for both Mac and PC have the validate feature built in.  </span></p><h2 style="margin-top:20px;"><span
style="letter-spacing: 0.0px;">5. DO NOT contract DIVITIS</span></h2><p><span
style="letter-spacing: 0.0px;">Divitis is a condition that beginners to CSS contract by putting everything on the page inside a DIV.  This partly comes from the transition from tables to divs.  Don’t get me wrong you should never use tables, unless it is for data purposes but you should not wrap every element on the page with a div.  For example do not replace a paragraph tag with a div tag.  View some examples below.</span></p><h3 style="margin-top:20px;">Incorrect Example:</h3><div
id="codebg"> &lt;div id=&quot;container&quot;&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;nav&quot;&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul id=&quot;navlist&quot;&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Home&lt;/li&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;About&lt;/li&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Services&lt;/li&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Contact&lt;/li&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;heading&quot;&gt;&lt;/div&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;news&quot;&gt;News&lt;/div&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;stories&quot;&gt;Stories&lt;/div&gt;<br
/> &lt;/div&gt;</div><p
style="margin-top:20px; font-weight: bold; font-style: italic;">Here is how to correct the code above</p><h3 style="margin-top:20px;">Correct Example:</h3><div
id="codebg"> &lt;div id=&quot;container&quot;&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&lt;ul id=&quot;navlist&quot;&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Home&lt;/li&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;About&lt;/li&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Services&lt;/li&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Contact&lt;/li&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;Heading&lt;/h1&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p id=&quot;news&quot;&gt;News&lt;/p&gt;<br
/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p id=&quot;stories&quot;&gt;Stories&lt;/p&gt;<br
/> &lt;/div&gt;</div><div><span
style="font-family: Helvetica, 'Times New Roman', 'Bitstream Charter', Times, fantasy; font-size: small;"><span
style="line-height: normal;"><br
/> </span></span></div><p>Technorati Tags: <a
href="http://technorati.com/tag/CSS+Tutorial" rel="tag">CSS Tutorial</a>, <a
href="http://technorati.com/tag/CSS+dont%26%238217%3Bs" rel="tag"> CSS dont&#8217;s</a>, <a
href="http://technorati.com/tag/beginners+CSS+techniques" rel="tag"> beginners CSS techniques</a>, <a
href="http://technorati.com/tag/Semantic+code" rel="tag"> Semantic code </a></p> ]]></content:encoded> <wfw:commentRss>http://www.threestyles.com/tutorials/5-css-donts-for-beginners/feed/</wfw:commentRss> <slash:comments>19</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 8/16 queries in 0.023 seconds using disk

Served from: www.threestyles.com @ 2010-09-06 10:10:12 -->