<?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>Dana Woodman &#187; CSS</title>
	<atom:link href="http://www.danawoodman.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.danawoodman.com</link>
	<description>The online home of Dana Woodman.</description>
	<lastBuildDate>Tue, 31 Aug 2010 22:05:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS3 box-shadow property</title>
		<link>http://www.danawoodman.com/2009/11/css3-box-shadow-property/</link>
		<comments>http://www.danawoodman.com/2009/11/css3-box-shadow-property/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 00:28:48 +0000</pubDate>
		<dc:creator>Dana Woodman</dc:creator>
				<category><![CDATA[Reference]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>

		<guid isPermaLink="false">http://www.danawoodman.com/?p=11</guid>
		<description><![CDATA[This post outlines the new CSS3 box-shadow property and what you can do with it in your designs.



Table Of Contents


    Description
    Examples
    Possible Values
    Browser Support
    Conclusions


Description

The box-shadow property allows drop shadows (as well as inner shadows) on block elements.

It [...]]]></description>
			<content:encoded><![CDATA[<p>This post outlines the new CSS3 box-shadow property and what you can do with it in your designs.</p>

<p><span id="more-11"></span></p>

<h3>Table Of Contents</h3>

<ul>
    <li><a href="#description">Description</a></li>
    <li><a href="#examples">Examples</a></li>
    <li><a href="#possible-values">Possible Values</a></li>
    <li><a href="#browser-support">Browser Support</a></li>
    <li><a href="#conclusion">Conclusions</a></li>
</ul>

<h3 id="description">Description</h3>

<p>The <code>box-shadow</code> property allows drop shadows (as well as inner shadows) on block elements.</p>

<p class="note">It is important to note that using <code>box-shadow</code> <span style="text-decoration: line-through;">alone is not supported in any browser yet because CSS3 is not finalized</span> is <a href="http://www.w3.org/TR/css3-background/#the-box-shadow">not even in the CSS3 specification anymore</a>. Currently to get it working in WebKit browsers (Safari, Chrome) you need to use <code>-webkit-box-shadow</code> and for Mozilla browsers like Firefox you must use <code>-moz-box-shadow</code>.</p>

<h3 id="examples">Examples</h3>

<h5>Box with a normal drop shadow</h5>

<p><pre>box-shadow: 3px 3px 3px #666;
-moz-box-shadow: 3px 3px 3px #666;
-webkit-box-shadow: 3px 3px 3px #666;</pre></p>

<p class="example-box" style="box-shadow 3px 3px 3px #666; -moz-box-shadow 3px 3px 3px #666; -webkit-box-shadow: 3px 3px 3px #666;;">This box should have a 3px drop shadow.</p>

<h5>Box with an equidistant drop shadow</h5>

<p><pre>box-shadow: 0 0 6px #666;
-moz-box-shadow: 0 0 6px #666;
-webkit-box-shadow: 0 0 6px #666;</pre></p>

<p class="example-box" style="box-shadow 0 0 6px #666; -moz-box-shadow 0 0 6px #666; -webkit-box-shadow: 0 0 6px #666;;">This box should have a drop shadow on all sides.</p>

<h5>Box with an inset shadow</h5>

<p><pre>box-shadow: inset 3px 3px 3px #666;
-moz-box-shadow: inset 3px 3px 3px #666;
-webkit-box-shadow: inset 3px 3px 3px #666;</pre></p>

<p class="example-box" style="box-shadow: inset 3px 3px 3px #666; -moz-box-shadow: inset 3px 3px 3px #666; -webkit-box-shadow: inset 3px 3px 3px #666;;">This box should have a 3px inner shadow.</p>

<h5>Box with a solid 2px drop shadow</h5>

<p><pre>box-shadow: 2px 2px 0 2px #666;
-moz-box-shadow: 2px 2px 0 2px #666;
-webkit-box-shadow: 2px 2px 0 2px #666;</pre></p>

<p class="example-box" style="box-shadow: 2px 2px 0 2px #666; -moz-box-shadow: 2px 2px 0 2px #666; -webkit-box-shadow: 2px 2px 0 2px #666;">This box should have a 2px offset drop shadow that is solid.</p>

<h5>Box with a reverse 3px drop shadow</h5>

<p><pre>box-shadow: -3px -3px 3px #666;
-moz-box-shadow: -3px -3px 3px #666;
-webkit-box-shadow: -3px -3px 3px #666;</pre></p>

<p class="example-box" style="box-shadow: -3px -3px 3px #666; -moz-box-shadow: -3px -3px 3px #666;; -webkit-box-shadow: -3px -3px 3px #666;">This box has a reverse 3px offset drop shadow.</p>

<h3 id="possible-values">Possible Values:</h3>

<table border="0" cellspacing="0">
<tbody>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><code>inset</code></td>
<td>If assigned, the outer shadow becomes a inner shadow.</td>
</tr>
<tr>
<td>horizontal offset</td>
<td>The distance to offset the shadow horizontally, can be positive or negative.</td>
</tr>
<tr>
<td>vertical offset</td>
<td>The distance to offset the shadow vertically, can be positive or negative.</td>
</tr>
<tr>
<td>blur radius</td>
<td>The distance to blur the shadow.</td>
</tr>
<tr>
<td>spread radius</td>
<td>The distance the radius is pushed away from the box.</td>
</tr>
<tr>
<td>shadow color</td>
<td>The color code to use for the shadow (e.g. &#8220;#fff&#8221;, or &#8220;white&#8221;, or &#8220;rgb(255,255,255), or even &#8220;rgba(255,255,255,.6)&#8221;).</td>
</tr>
</tbody></table>

<h3 id="browser-support">Browser Support</h3>

<h5>Supported Browsers</h5>

<ul>
    <li>Firefox (since version 3.5)</li>
    <li>Safari (since version 3.1)</li>
    <li>Chrome (since  first version).</li>
</ul>

<h5>Unsupported Browsers</h5>

<ul>
    <li>Internet Explorer</li>
    <li>Opera (rumored to be supported in version 10)</li>
</ul>

<h3 id="conclusion">Conclusion</h3>

<p>I hope the above information was useful. If you want to see more examples of this property, want to see other tutorials, or have a question or comment please leave a message below.</p>

<p>Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danawoodman.com/2009/11/css3-box-shadow-property/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making a Rounded Tab Menu with CSS and HTML</title>
		<link>http://www.danawoodman.com/2009/08/making-a-rounded-tab-menu-with-css-and-html/</link>
		<comments>http://www.danawoodman.com/2009/08/making-a-rounded-tab-menu-with-css-and-html/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 01:40:39 +0000</pubDate>
		<dc:creator>Dana Woodman</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[menus]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://www.danawoodman.com/?p=52</guid>
		<description><![CDATA[

In this article I am going to show you how you can make an accessible CSS based rounded tab menu using some semantic HTML and a few images.



You can view the demo here.

You&#8217;ll see some similarity between this technique and A List Apart&#8217;s Sliding Doors menu, however there is one key difference between this technique [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.danawoodman.com/2009/08/making-a-rounded-tab-menu-with-css-and-html/4432715587_75ed4151b7_o/" rel="attachment wp-att-442"><img src="http://www.danawoodman.com/wp-content/uploads/2009/08/4432715587_75ed4151b7_o.jpg" alt="Making a Rounded Tab Menu with CSS and HTML" title="Making a Rounded Tab Menu with CSS and HTML" width="610" height="220" class="alignnone size-full wp-image-442" /></a></p>

<p>In this article I am going to show you how you can make an accessible CSS based rounded tab menu using some semantic HTML and a few images.</p>

<p><span id="more-52"></span></p>

<p>You can <a href="http://demos.danawoodman.com/rounded-tab-menu/" title="View the Rounded Tab Menu demo">view the demo here</a>.</p>

<p>You&#8217;ll see some similarity between this technique and <a href="http://www.alistapart.com" title="Visit A List Apart's site">A List Apart</a>&#8217;s <a href="http://www.alistapart.com/articles/slidingdoors/" title="View the Sliding Doors menu tutorial on A List Apart">Sliding Doors</a> menu, however <strong>there is one key difference</strong> between this technique and theirs and that is that <strong>the tabs on this menu are fully clickable</strong>. If you go to their <a href="http://www.alistapart.com/d/slidingdoors/v1/v1.html" title="View the Sliding Doors demo page">working demo page</a>, you will notice that you cannot click on the left portion of the tab which, for me, was not ideal.</p>

<p>Also, one other issue I had with ALA&#8217;s menu was that when clicked, it would leave a hit area highlight around only part of the menu item, rather than the whole menu item, which looks strange if you are using this menu in any sort of JavaScript menu or any menu that does not force the page to reload.</p>

<p>To solve this issue, I added an extra (somewhat) semantic <code>span</code> tag to the markup to create the desired rounded effect, while rendering the tab fully clickable. So, with that,  here is the HTML we are going to start with:</p>

<h3>The HTML</h3>

<pre><code>&lt;ul id="menu"&gt;
    &lt;li&gt;&lt;a title="Link title here" href="#"&gt;&lt;span&gt;Home&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a title="Link title here" href="#"&gt;&lt;span&gt;About&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a title="Link title here" href="#"&gt;&lt;span&gt;Portfolio&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a title="Link title here" href="#"&gt;&lt;span&gt;Services&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a title="Link title here" href="#"&gt;&lt;span&gt;Testimony&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a title="Link title here" href="#"&gt;&lt;span&gt;Contact&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>Which will give you something like this:</p>

<p><img src="/wp-content/uploads/2008/08/rounded-tabs-step-1.png" alt="Rounded tab menu, step 1" /></p>

<h3>Basic Styling</h3>

<p>Now we need to add some basic CSS for styling. We need to make the menu run inline and to remove the default list formatting:</p>

<pre><code>#menu {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}
#menu li {
    float: left;
}
#menu a {
    float: left;
    display: block;
}
</code></pre>

<p>After adding the CSS to the page, we should get something like this:</p>

<p><img src="/wp-content/uploads/2008/08/rounded-tabs-step-2.png" alt="Rounded tab menu, step 2" /></p>

<h3>Making It Pretty</h3>

<p>OK, so now we have an inline menu, but it&#8217;s not too pretty is it? Well, now we&#8217;re going to spruce it up a bit by adding some padding and text styling with some CSS and we&#8217;re also going to style the <code>span</code> tags that we added in to the HTML  as well:</p>

<pre><code>#menu {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}
#menu li {
    float: left;
}
#menu a {
    float: left;
    display: block;
    padding-right: 16px;
    padding-left: 0;
    font-weight: bold;
    color: #666;
    text-decoration: none;
    cursor: pointer;
}
#menu a span {
    float: left;
    padding-top: 8px;
    padding-bottom: 6px;
    padding-left: 16px;
    cursor: pointer;
}
</code></pre>

<p>What we did here was applied some padding to the right of the link and some padding to the left of the span tag to center the text in the tab. We also applied the &#8220;cursor&#8221; property to the span tag to make sure that the browser treats it as a link by showing the pointer icon when the user hovers over it with their mouse. You should see something like this:</p>

<p><img src="/wp-content/uploads/2008/08/rounded-tabs-step-3.png" alt="Rounded tab menu, step 3" /></p>

<h3>Adding The Rounded Tabs</h3>

<p>Now that we have a properly padded and colored menu, we need to add in the images that will create the rounded corner effect:</p>

<pre><code>#menu {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    background: url(images/bg_menu.png) repeat-x left bottom;
}
#menu li {
    float: left;
    margin-right: 1px;
}
#menu a {
    float: left;
    display: block;
    background: url(images/bg_menu_right.png) no-repeat right top;
    padding-right: 16px;
    padding-left: 0;
    font-weight: bold;
    color: #666;
    text-decoration: none;
    cursor: pointer;
}
#menu a span {
    float: left;
    background: url(images/bg_menu_left.png) no-repeat left top;
    padding-top: 8px;
    padding-bottom: 6px;
    padding-left: 16px;
    cursor: pointer;
}
</code></pre>

<p>With the images in, we should see our menu looking about like this:</p>

<p><img src="/wp-content/uploads/2008/08/rounded-tabs-step-4.png" alt="Rounded tab menu, step 4" /></p>

<p>Looks pretty neat huh? Well now all we have to do is tweak a few little things and we should be good to go!</p>

<h3>Finishing It Up</h3>

<p>To finish things off, I am going to add in a little line in the background to tie the tabs together as well as give the tabs a hover state so they are interactive. One other little thing I am going to add is an &#8220;on&#8221; state which can be used to show which tab&#8217;s content is active on the page. So lets add in the CSS now and see what we can do:</p>

<pre><code>#menu {
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    background: url(images/bg_menu.png) repeat-x left bottom;
}
#menu:after {
    content: " ";
    clear: both;
    display: block;
    visibility: hidden;
    height: 0;
}
#menu li {
    float: left;
    margin-right: 1px;
}
#menu a {
    float: left;
    display: block;
    background: url(images/bg_menu_right.png) no-repeat right top;
    padding-right: 16px;
    padding-left: 0;
    font-weight: bold;
    color: #666;
    text-decoration: none;
    cursor: pointer;
}
#menu a span {
    float: left;
    background: url(images/bg_menu_left.png) no-repeat left top;
    padding-top: 8px;
    padding-bottom: 6px;
    padding-left: 16px;
    cursor: pointer;
}
#menu a:hover {
    background: url(images/bg_menu_hover_right.png) no-repeat right top;
    color: #333;
}
#menu a:hover span {
    background: url(images/bg_menu_hover_left.png) no-repeat left top;
}
#menu .on, #menu .on:hover {
    background: url(images/bg_menu_on_right.png) no-repeat right top;
    color: #000;
}
#menu .on span, #menu .on:hover span {
    background: url(images/bg_menu_on_left.png) no-repeat left top;
}
</code></pre>

<p>You&#8217;ll notice I added in a CSS rule for <code>#menu:after</code>. That piece of code is called a clearfix, which clears the floats used in the menu so that it does not overlap content below it. If you did not have this clearfix, the content following the menu will wrap around, causing many undesirable effects.</p>

<p>So now, after you&#8217;ve added the above CSS, you should see your menu looking about like this:</p>

<p><img src="/wp-content/uploads/2008/08/rounded-tabs-step-5.png" alt="Rounded tab menu, step 5" /></p>

<p>The &#8220;Home&#8221; tab has the class &#8220;on&#8221; applied to it and the &#8220;Contact&#8221; tab shows what the hover should look like. Now you&#8217;re done! Congrats!</p>

<h3>Conclusion</h3>

<p>And <a href="http://demos.danawoodman.com/rounded-tab-menu/" title="View the Rounded Tab Menu demo">there you have it</a>, an accessible, semantic rounded tab menu built with some lean HTML, a smidgen of CSS and a few images.</p>

<p>I have included the PSD files I used to create the tabs in the <a href="http://demos.danawoodman.com/rounded-tab-menu/rounded-tab-menu.zip" title="Download the ZIP file of the tutorial">Zip file</a> so that you can easily make your own, custom styled menus.</p>

<p>I hope you enjoyed this tutorial! If you&#8217;ve got any questions or feedback, please feel free to leave a comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.danawoodman.com/2009/08/making-a-rounded-tab-menu-with-css-and-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
