<?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>Blog of Soh Tanaka &#187; CSS/XHTML</title>
	<atom:link href="http://www.sohtanaka.com/web-design/category/css-xhtml-tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sohtanaka.com</link>
	<description>Torrance Website Design - Soh Tanaka</description>
	<lastBuildDate>Wed, 10 Mar 2010 07:15:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Automatic Image Slider w/ CSS &amp; jQuery</title>
		<link>http://www.sohtanaka.com/web-design/automatic-image-slider-w-css-jquery/</link>
		<comments>http://www.sohtanaka.com/web-design/automatic-image-slider-w-css-jquery/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 08:03:15 +0000</pubDate>
		<dc:creator>Soh</dc:creator>
				<category><![CDATA[CSS/XHTML]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.sohtanaka.com/?p=2827</guid>
		<description><![CDATA[With the release of the iPad and its lack of support for flash, it has stirred up a lot of debates regarding the future of flash. With this in mind, I believe it is wise to build simple widgets like the image slider using HTML/CSS/Javascript, and leave more interactive applications for flash if needed. The [...]]]></description>
			<content:encoded><![CDATA[<p>With the release of the iPad and its lack of support for flash, it has stirred up a lot<span id="more-2827"></span> of <a href="http://www.gskinner.com/blog/archives/2010/02/my_thoughts_on.html">debates</a> regarding <a href="http://www.techcrunch.com/2010/02/05/the-future-of-web-content-html5-flash-mobile-apps/">the future of flash</a>. With this in mind, I believe it is wise to build simple widgets like the image slider using HTML/CSS/Javascript, and leave more interactive applications for flash if needed. The html based image slider will have its benefits with SEO and will also degrade gracefully for those w/out js.</p>
<p><a href="http://www.sohtanaka.com/web-design/examples/image-slider/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/image-slider/demo.jpg" alt="Automatic Image Slider CSS jQuery" /></a></p>
<div class="highlight">
<p><a class="view" href="http://www.sohtanaka.com/web-design/examples/image-slider/" target="_blank">View Demo</a></div>
<h4>The Wireframe &#8211; HTML</h4>
<p>Start with having a wrapping container div called <code>main_view</code>, and two sections nested inside called <code>image_reel</code> and <code>paging</code>. The <code>image_reel</code> will contain the sliding images, and <code>paging</code> contains the paging controls. Take a look at the image below for a visual.</p>
<p><img class="center" src="http://www.sohtanaka.com/web-design/examples/image-slider/1.jpg" alt="Automatic Image Slider CSS jQuery" /></p>
<pre>&lt;div class="<strong>main_view</strong>"&gt;
    &lt;div class="<strong>window</strong>"&gt;
        &lt;div class="<strong>image_reel</strong>"&gt;
            &lt;a href="#"&gt;&lt;img src="reel_1.jpg" alt="" /&gt;&lt;/a&gt;
            &lt;a href="#"&gt;&lt;img src="reel_2.jpg" alt="" /&gt;&lt;/a&gt;
            &lt;a href="#"&gt;&lt;img src="reel_3.jpg" alt="" /&gt;&lt;/a&gt;
            &lt;a href="#"&gt;&lt;img src="reel_4.jpg" alt="" /&gt;&lt;/a&gt;
        &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="<strong>paging</strong>"&gt;
        &lt;a href="#" rel="1"&gt;1&lt;/a&gt;
        &lt;a href="#" rel="2"&gt;2&lt;/a&gt;
        &lt;a href="#" rel="3"&gt;3&lt;/a&gt;
        &lt;a href="#" rel="4"&gt;4&lt;/a&gt;
    &lt;/div&gt;
&lt;/div&gt;</pre>
<h4>Styling &#8211; CSS</h4>
<p>Take a look at the comments below for an explanation of the styles.</p>
<pre><span style="color: #999;">/*--Main Container--*/</span>
.main_view {
	float: left;
	position: relative;
}
<span style="color: #999;">/*--Window/Masking Styles--*/</span>
.window {
	height:286px;	width: 790px;
	overflow: hidden; <span style="color: #999;">/*--Hides anything outside of the set width/height--*/</span>
	position: relative;
}
.image_reel {
	position: absolute;
	top: 0; left: 0;
}
.image_reel img {float: left;}

<span style="color: #999;">/*--Paging Styles--*/</span>
.paging {
	position: absolute;
	bottom: 40px; right: -7px;
	width: 178px; height:47px;
	z-index: 100; <span style="color: #999;">/*--Assures the paging stays on the top layer--*/</span>
	text-align: center;
	line-height: 40px;
	background: url(paging_bg2.png) no-repeat;
	display: none; <span style="color: #999;">/*--Hidden by default, will be later shown with jQuery--*/</span>
}
.paging a {
	padding: 5px;
	text-decoration: none;
	color: #fff;
}
.paging a.active {
	font-weight: bold;
	background: #920000;
	border: 1px solid #610000;
	-moz-border-radius: 3px;
	-khtml-border-radius: 3px;
	-webkit-border-radius: 3px;
}
.paging a:hover {font-weight: bold;}</pre>
<h4>Step 3. Setting up jQuery</h4>
<p><small>For those who are not familiar with <a href="http://www.jquery.com" target="_blank">jQuery</a>, do check out their site first and get an overview of how it works. I’ve shared a <a href="http://www.sohtanaka.com/web-design/tag/jquery/" target="_blank">few tricks</a> that I have picked up along the way, you can check those out as well.</small></p>
<p><strong>Initial Step – Call the jQuery file</strong></p>
<p>You can choose to <a href="http://jquery.com/" target="_blank">download</a> the file from the jQuery site, or you can use this one hosted on Google.</p>
<pre>&lt;script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"&gt;&lt;/script&gt;</pre>
<p>Directly after the line where you called your jQuery, start a new &lt;script&gt; tag and start your code by using the $(document).ready event. This allows your jQuery code to run the instant the DOM is ready to be manipulated. The code you will be writing in the next few steps will all take place within.</p>
<pre>$(document).ready(function() {
	<span style="color: #999;">//Code goes here</span>
});</pre>
<h4>Step 4. Bringing it to Life – jQuery</h4>
<p>The following script contains comments explaining which jQuery actions are being performed.</p>
<p><strong>Setting up the Image Slider</strong><br />
Start by showing the paging and activating the first link. Then we will calculate and adjust the width of the <code>image_reel</code> according to how many slides there are.</p>
<pre><span style="color: #999;">//Show the paging and activate its first link</span>
$(".paging").show();
$(".paging a:first").addClass("active");

<span style="color: #999;">//Get size of the image, how many images there are, then determin the size of the image reel.</span>
var imageWidth = $(".window").width();
var imageSum = $(".image_reel img").size();
var imageReelWidth = imageWidth * imageSum;

<span style="color: #999;">//Adjust the image reel to its new size</span>
$(".image_reel").css({'width' : imageReelWidth});</pre>
<p><strong>Setting up the Slider Function and Timer</strong><br />
We first create the function for the slide event by itself (<code>rotate</code>). Then create another function (<code>rotateSwitch</code>) that will rotate and repeat that slide event (<code>rotate</code>).</p>
<pre><span style="color: #999;">//Paging  and Slider Function</span>
rotate = function(){
    var triggerID = $active.attr("rel") - 1; <span style="color: #999;">//Get number of times to slide</span>
    var image_reelPosition = triggerID * imageWidth; <span style="color: #999;">//Determines the distance the image reel needs to slide</span>

    $(".paging a").removeClass('active'); <span style="color: #999;">//Remove all active class</span>
    $active.addClass('active'); <span style="color: #999;">//Add active class (the $active is declared in the rotateSwitch function)</span>

    <span style="color: #999;">//Slider Animation</span>
    $(".image_reel").animate({
        left: -image_reelPosition
    }, 500 );

}; 

<span style="color: #999;">//Rotation  and Timing Event</span>
rotateSwitch = function(){
    play = setInterval(function(){ <span style="color: #999;">//Set timer - this will repeat itself every 7 seconds</span>
        $active = $('.paging a.active').next(); <span style="color: #999;">//Move to the next paging</span>
        if ( $active.length === 0) { <span style="color: #999;">//If paging reaches the end...</span>
            $active = $('.paging a:first'); <span style="color: #999;">//go back to first</span>
        }
        rotate(); <span style="color: #999;">//Trigger the paging and slider function</span>
    }, 7000); <span style="color: #999;">//Timer speed in milliseconds (7 seconds)</span>
};

rotateSwitch(); <span style="color: #999;">//Run function on launch</span></pre>
<p>Take a look at this <a href="http://jquery-howto.blogspot.com/2009/04/ajax-update-content-every-x-seconds.html">tutorial</a> for an explanation of how the timer (<code>setInterval</code>) works.</p>
<p><strong>Hover and Click Events</strong><br />
In case the user wants to view the slide for a longer period of time, we will allow the slider to stop when it is hovered. Another thing to consider is we should reset the timer each time the paging is clicked. This will prevent unexpected slide switches and allow for a smoother experience.</p>
<pre><span style="color: #999;">//On Hover</span>
$(".image_reel a").hover(function() {
    clearInterval(play); <span style="color: #999;">//Stop the rotation</span>
}, function() {
    rotateSwitch(); <span style="color: #999;">//Resume rotation timer</span>
});	

<span style="color: #999;">//On Click</span>
$(".paging a").click(function() {
    $active = $(this); <span style="color: #999;">//Activate the clicked paging</span>
    <span style="color: #999;">//Reset Timer</span>
    clearInterval(play); <span style="color: #999;">//Stop the rotation</span>
    rotate(); <span style="color: #999;">//Trigger rotation immediately</span>
    rotateSwitch(); <span style="color: #999;">// Resume rotation timer</span>
    return false; <span style="color: #999;">//Prevent browser jump to link anchor</span>
});</pre>
<p><a href="http://www.sohtanaka.com/web-design/examples/image-slider/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/image-slider/demo.jpg" alt="Automatic Image Slider CSS jQuery" /></a></p>
<div class="highlight">
<p><a class="view" href="http://www.sohtanaka.com/web-design/examples/image-slider/" target="_blank">View Demo</a></div>
<h4>Inspiration</h4>
<p>Below are some sites that use similar techniques, check them out for inspiration!</p>
<p><a href="http://www.netdreams.co.uk/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/image-slider/sample1.jpg" alt="Automatic Image Slider CSS jQuery" /></a><br />
<a href="http://tutorial9.net/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/image-slider/sample2.jpg" alt="Automatic Image Slider CSS jQuery" /></a><br />
<a href="http://radiumlabs.com/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/image-slider/sample3.jpg" alt="Automatic Image Slider CSS jQuery" /></a><br />
<a href="http://www.bigspaceship.com/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/image-slider/sample4.jpg" alt="Automatic Image Slider CSS jQuery" /></a><br />
<a href="http://electricpulp.com/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/image-slider/sample5.jpg" alt="Automatic Image Slider CSS jQuery" /></a></p>
<h4>Related Articles</h4>
<ul>
<li><a href="http://jquery-howto.blogspot.com/2009/04/ajax-update-content-every-x-seconds.html" target="_target">AJAX update content every X seconds </a></li>
<li><a href="http://snook.ca/archives/javascript/simplest-jquery-slideshow" target="_target">Simplest jQuery Slideshow</a></li>
</ul>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/" rel="bookmark" title="July 1, 2009">Simple Tabs w/ CSS &#038; jQuery</a></li>
<li><a href="http://www.sohtanaka.com/web-design/easy-toggle-jquery-tutorial/" rel="bookmark" title="March 19, 2009">Simple Toggle with CSS &#038; jQuery</a></li>
<li><a href="http://www.sohtanaka.com/web-design/horizontal-sub-nav-with-css-jquery/" rel="bookmark" title="July 13, 2009">Horizontal Subnav with CSS</a></li>
<li><a href="http://www.sohtanaka.com/web-design/greyscale-hover-effect-w-css-jquery/" rel="bookmark" title="September 14, 2009">Greyscale Hover Effect w/ CSS &#038; jQuery</a></li>
<li><a href="http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-2/" rel="bookmark" title="December 7, 2009">Facebook Style Footer Admin Panel Part 2</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sohtanaka.com/web-design/automatic-image-slider-w-css-jquery/feed/</wfw:commentRss>
		<slash:comments>87</slash:comments>
		</item>
		<item>
		<title>Facebook Style Footer Admin Panel Part 2</title>
		<link>http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-2/</link>
		<comments>http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-2/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 07:41:42 +0000</pubDate>
		<dc:creator>Soh</dc:creator>
				<category><![CDATA[CSS/XHTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[navigation]]></category>

		<guid isPermaLink="false">http://www.sohtanaka.com/?p=2734</guid>
		<description><![CDATA[This is Part 2 of the Facebook Style Footer Admin Panel, if you haven&#8217;t checked out Part 1 this is the perfect time to check it out.
Step 2. Styling the Chat Panel &#38; Alert Panel – HTML &#38; CSS
Just like developing a drop-down menu, have a nested sub-panel within the list item. Look at the [...]]]></description>
			<content:encoded><![CDATA[<p>This is Part 2 of the Facebook Style Footer Admin Panel, if you haven&#8217;t checked <span id="more-2734"></span>out <a href="http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-1/">Part 1 this is the perfect time to </a><a href="http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-1/">check it out</a>.</p>
<h4>Step 2. Styling the Chat Panel &amp; Alert Panel – HTML &amp; CSS</h4>
<p>Just like developing a drop-down menu, have a nested sub-panel within the list item. Look at the image below to get an overview of how this is layed out.</p>
<p><img class="center" src="http://www.sohtanaka.com/web-design/examples/footer-panel/05_chat_alert_panel.gif" alt="Collapsible Subpanel Demo" /></p>
<p><strong>HTML</strong></p>
<pre>&lt;li <strong>id="alertpanel"</strong>&gt;
    &lt;a href="#" class="alerts"&gt;Alerts&lt;/a&gt;
    &lt;div <strong>class="subpanel"</strong>&gt;
        &lt;h3&gt;&lt;span&gt; &amp;ndash; &lt;/span&gt;Notifications&lt;/h3&gt;
        &lt;ul&gt;
            &lt;li class="view"&gt;&lt;a href="#"&gt;View All&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;
                &lt;a href="#" class="delete"&gt;X&lt;/a&gt;
                &lt;p&gt;<span style="color: #999;">&lt;!--Content--&gt;</span>&lt;/p&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;a href="#" class="delete"&gt;X&lt;/a&gt;
                &lt;p&gt;<span style="color: #999;">&lt;!--Content--&gt;</span>&lt;/p&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
&lt;/li&gt;
&lt;li <strong>id="chatpanel"</strong>&gt;
    &lt;a href="#" class="chat"&gt;Friends (&lt;strong&gt;18&lt;/strong&gt;) &lt;/a&gt;
    &lt;div <strong>class="subpanel"</strong>&gt;
        &lt;h3&gt;&lt;span&gt; &amp;ndash; &lt;/span&gt;Friends Online&lt;/h3&gt;
        &lt;ul&gt;
            &lt;li&gt;&lt;span&gt;Family Members&lt;/span&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;&lt;img src="chat-thumb.gif" alt="" /&gt; Your Friend&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="#"&gt;&lt;img src="chat-thumb.gif" alt="" /&gt; Your Friend&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/div&gt;
&lt;/li&gt;</pre>
<p><strong>CSS</strong></p>
<p>Since we declared a list item link style already (with the text replament technique), override the properties so we can use regular links in the sub-panels.</p>
<pre>#footpanel ul li div a { <span style="color: #999;">/*--Reset link style for sub-panel links--*/</span>
	text-indent: 0;
	width: auto;
	height: auto;
	padding: 0;
	float: none;
	color: #00629a;
	position: static;
}
#footpanel ul li div a:hover {	text-decoration: underline; } <span style="color: #999;">/*--Reset hover style for sub-panel links--*/</span></pre>
<p>Style the sub-panel container with an absolute positioning that will sit at the top of the main footer panel (27px from the bottom of the footer panel). Then create the headings using an <strong><code>&lt;h3&gt;</code></strong>.</p>
<pre>#footpanel .subpanel {
	position: absolute;
	left: 0; bottom: 27px;
	display: none;	<span style="color: #999;">/*--Hide by default--*/</span>
	width: 198px;
	border: 1px solid #555;
	background: #fff;
	overflow: hidden;
}
#footpanel h3 {
	background: #526ea6;
	padding: 5px 10px;
	color: #fff;
	font-size: 1.1em;
	cursor: pointer;
}
#footpanel h3 span { <span style="color: #999;">/*--Right aligned "-" icon--*/</span>
	font-size: 1.5em;
	float: right;
	line-height: 0.6em;
	font-weight: normal;
}</pre>
<p>The following section is the area that will be scrollable. Use an <code>overflow: auto;</code> to allow the scroll to appear when the content exceeeds the <strong><code>&lt;ul&gt;</code></strong> height.</p>
<pre>#footpanel .subpanel ul{
	padding: 0; margin: 0;
	background: #fff;
	width: 100%;
	overflow: auto;
	padding-bottom: 2px;
}
#footpanel .subpanel li{
	float: none; <span style="color: #999;">/*--Reset float--*/</span>
	display: block;
	padding: 0; margin: 0;
	overflow: hidden;
	clear: both;
	background: #fff;
	position: static;  <span style="color: #999;">/*--Reset relative positioning--*/</span>
	font-size: 0.9em;
}</pre>
<h4>Chat Panel</h4>
<p><img class="center" src="http://www.sohtanaka.com/web-design/examples/footer-panel/06_chatpanel_details.gif" alt="Chat Panel Details" /></p>
<pre>#chatpanel .subpanel li { background: url(dash.gif) repeat-x left center; }
#chatpanel .subpanel li span {
	padding: 5px;
	background: #fff;
	color: #777;
	float: left;
}
#chatpanel .subpanel li a img {
	float: left;
	margin: 0 5px;
}
#chatpanel .subpanel li a{
	padding: 3px 0;	margin: 0;
	line-height: 22px;
	height: 22px;
	background: #fff;
	display: block;
}
#chatpanel .subpanel li a:hover {
	background: #3b5998;
	color: #fff;
	text-decoration: none;
}</pre>
<h4>Alert Panel</h4>
<p><img class="center" src="http://www.sohtanaka.com/web-design/examples/footer-panel/07_alertpanel_details.gif" alt="Alert Panel Details" /></p>
<pre>#alertpanel .subpanel { right: 0; left: auto; <span style="color: #999;">/*--Reset left positioning and make it right positioned--*/</span> }
#alertpanel .subpanel li {
	border-top: 1px solid #f0f0f0;
	display: block;
}
#alertpanel .subpanel li p {padding: 5px 10px;}
#alertpanel .subpanel li a.delete{
	background: url(delete_x.gif) no-repeat;
	float: right;
	width: 13px; height: 14px;
	margin: 5px;
	text-indent: -9999px;
	visibility: hidden; <span style="color: #999;">/*--Hides by default but still takes up space (not completely gone like display:none;)--*/</span>
}
#alertpanel .subpanel li a.delete:hover { background-position: left bottom; }
#footpanel #alertpanel li.view {
	text-align: right;
	padding: 5px 10px 5px 0;
}</pre>
<h4>Step 3. Activating the Subpanel – jQuery</h4>
<p><strong>Adjust the Subpanel Height</strong></p>
<p>The tricky part about the collapsible sub-panel is to make sure the content does not stretch beyond the height of the viewport when active.</p>
<p><img class="center" src="http://www.sohtanaka.com/web-design/examples/footer-panel/08_adjustpanel.gif" alt="Adjust Panel height" /></p>
<p>To make sure the height does not exceed past the viewport, use the following function to calculate and resize the sub-panel according to the viewport size.</p>
<p><img class="center" src="http://www.sohtanaka.com/web-design/examples/footer-panel/09_adjustpanel.gif" alt="Adjust Panel height" /></p>
<p>The following script contains comments explaining which jQuery actions are being performed.</p>
<h4>jQuery</h4>
<pre><span style="color: #999;">//Adjust panel height</span>
$.fn.adjustPanel = function(){
    $(this).find("ul, .subpanel").css({ 'height' : 'auto'}); <span style="color: #999;">//Reset sub-panel and ul height</span>

    var windowHeight = $(window).height(); <span style="color: #999;">//Get the height of the browser viewport</span>
    var panelsub = $(this).find(".subpanel").height(); <span style="color: #999;">//Get the height of sub-panel</span>
    var panelAdjust = windowHeight - 100; <span style="color: #999;">//Viewport height - 100px (Sets max height of sub-panel)</span>
    var ulAdjust =  panelAdjust - 25; <span style="color: #999;">//Calculate ul size after adjusting sub-panel</span>

    if ( panelsub &gt; panelAdjust ) {	 <span style="color: #999;">//If sub-panel is taller than max height...</span>
        $(this).find(".subpanel").css({ 'height' : panelAdjust }); <span style="color: #999;">//Adjust sub-panel to max height</span>
        $(this).find("ul").css({ 'height' : panelAdjust}); <span style="color: #999;">////Adjust subpanel ul to new size</span>
    }
    else if { <span style="color: #999;">//If sub-panel is smaller than max height...</span>
        $(this).find("ul").css({ 'height' : 'auto'}); <span style="color: #999;">//Set sub-panel ul to auto (default size)</span>
    }
};

<span style="color: #999;">//Execute function on load</span>
$("#chatpanel").adjustPanel(); <span style="color: #999;">//Run the adjustPanel function on #chatpanel</span>
$("#alertpanel").adjustPanel(); <span style="color: #999;">//Run the adjustPanel function on #alertpanel</span>

<span style="color: #999;">//Each time the viewport is adjusted/resized, execute the function</span>
$(window).resize(function () {
    $("#chatpanel").adjustPanel();
    $("#alertpanel").adjustPanel();
});</pre>
<h4>Add the Toggle Function</h4>
<p>Since both of the chat and alert panels are collapsible, we must treat this like the logic of an accordion (when one opens, the other closes). We also need to allow the panels to collapse when clicking out of the sub-panels.</p>
<p>The following script contains comments explaining which jQuery actions are being performed.</p>
<pre><span style="color: #999;">//Click event on Chat Panel and Alert Panel	</span>
$("#chatpanel a:first, #alertpanel a:first").click(function() { <span style="color: #999;">//If clicked on the first link of #chatpanel and #alertpanel...</span>
    if($(this).next(".subpanel").is(':visible')){ <span style="color: #999;">//If subpanel is already active...</span>
        $(this).next(".subpanel").hide(); <span style="color: #999;">//Hide active subpanel</span>
        $("#footpanel li a").removeClass('active'); <span style="color: #999;">//Remove active class on the subpanel trigger</span>
    }
    else {<span style="color: #999;"> //if subpanel is not active...</span>
        $(".subpanel").hide(); <span style="color: #999;">//Hide all subpanels</span>
        $(this).next(".subpanel").toggle(); <span style="color: #999;">//Toggle the subpanel to make active</span>
        $("#footpanel li a").removeClass('active'); <span style="color: #999;">//Remove active class on all subpanel trigger</span>
        $(this).toggleClass('active'); <span style="color: #999;">//Toggle the active class on the subpanel trigger</span>
    }
    return false; <span style="color: #999;">//Prevent browser jump to link anchor</span>
});

<span style="color: #999;">//Click event outside of subpanel</span>
$(document).click(function() { <span style="color: #999;">//Click anywhere and...</span>
    $(".subpanel").hide(); <span style="color: #999;">//hide subpanel</span>
    $("#footpanel li a").removeClass('active'); <span style="color: #999;">//remove active class on subpanel trigger</span>
});
$('.subpanel ul').click(function(e) {
    e.stopPropagation(); <span style="color: #999;">//Prevents the subpanel ul from closing on click</span>
});

<span style="color: #999;">//Show/Hide delete icons on Alert Panel</span>
$("#alertpanel li").hover(function() {
    $(this).find("a.delete").css({'visibility': 'visible'}); <span style="color: #999;">//Show delete icon on hover</span>
},function() {
    $(this).find("a.delete").css({'visibility': 'hidden'}); <span style="color: #999;">//Hide delete icon on hover out</span>
});</pre>
<p><a href="http://www.sohtanaka.com/web-design/examples/footer-panel/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/footer-panel/01_finalDemo.gif" alt="Final Demo" /></a></p>
<div class="highlight">
<p><a class="view" href="http://www.sohtanaka.com/web-design/examples/footer-panel/" target="_blank">Final Demo</a></div>
<h4>Conclusion</h4>
<p>The footer panel can be useful for admin driven applications and much more. There are many useful techniques that we covered today like the fixed footer, CSS tooltips, height calculation function, and multiple toggle function, that can be used in various ways for your future projects.</p>
<p>If you have any questions, concerns, or suggestions, please do not hesitate to let me know!<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-1/" rel="bookmark" title="November 29, 2009">Facebook Style Footer Admin Panel Part 1</a></li>
<li><a href="http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/" rel="bookmark" title="July 1, 2009">Simple Tabs w/ CSS &#038; jQuery</a></li>
<li><a href="http://www.sohtanaka.com/web-design/easy-toggle-jquery-tutorial/" rel="bookmark" title="March 19, 2009">Simple Toggle with CSS &#038; jQuery</a></li>
<li><a href="http://www.sohtanaka.com/web-design/horizontal-sub-nav-with-css-jquery/" rel="bookmark" title="July 13, 2009">Horizontal Subnav with CSS</a></li>
<li><a href="http://www.sohtanaka.com/web-design/greyscale-hover-effect-w-css-jquery/" rel="bookmark" title="September 14, 2009">Greyscale Hover Effect w/ CSS &#038; jQuery</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-2/feed/</wfw:commentRss>
		<slash:comments>54</slash:comments>
		</item>
		<item>
		<title>Facebook Style Footer Admin Panel Part 1</title>
		<link>http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-1/</link>
		<comments>http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-1/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 04:49:00 +0000</pubDate>
		<dc:creator>Soh</dc:creator>
				<category><![CDATA[CSS/XHTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[navigation]]></category>

		<guid isPermaLink="false">http://www.sohtanaka.com/?p=2715</guid>
		<description><![CDATA[The popularity of social media has been booming in the past few years and Facebook definitely has climbed high to the top of the social network rankings. Facebook has many Ajax driven features and applications that are very impressive, and one of the things I particularly like is the footer admin panel, where it neatly [...]]]></description>
			<content:encoded><![CDATA[<p>The popularity of social media has been booming in the past few years and <a href="http://www.facebook.com" target="_blank">Facebook</a> <span id="more-2715"></span>definitely has climbed high to the top of the social network rankings. Facebook has many Ajax driven features and applications that are very impressive, and one of the things I particularly like is the footer admin panel, where it neatly organizes frequently used links and applications.</p>
<p>This week I would like to cover part 1 of how to recreate the Facebook footer admin panel with CSS and jQuery.</p>
<p><a href="http://www.sohtanaka.com/web-design/examples/footer-panel/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/footer-panel/01_finalDemo.gif" alt="Final Demo" /></a></p>
<div class="highlight">
<p><a class="view" href="http://www.sohtanaka.com/web-design/examples/footer-panel/tooltip.htm" target="_blank">Part 1 Demo</a> | <a class="view" href="http://www.sohtanaka.com/web-design/examples/footer-panel/" target="_blank">Final Demo</a></div>
<h3>Step 1. Wireframe and Tooltip Bubbles – HTML &amp; CSS</h3>
<p>Lay out the wireframe of the admin panel using an unordered list for the foundation. The last two list items (Alert Panel &amp; Chat Panel) will have sub-panels nested within them. Since these two panels will float to the right, the order in the markup will be reversed.</p>
<p><img class="center" src="http://www.sohtanaka.com/web-design/examples/footer-panel/02_foundation_tooltip.gif" alt="Tooltip foundation" /></p>
<p>Notice that there is a <strong><code>&lt;small&gt;</code></strong> tag nested within the <strong><code>&lt;a&gt;</code></strong> tag, this is how we will achieve our tooltip bubble on the navigation.</p>
<h4>HTML</h4>
<pre>&lt;div id="footpanel"&gt;
    &lt;ul id="mainpanel"&gt;
        &lt;li&gt;&lt;a href="#" class="home"&gt;Inspiration &lt;small&gt;Design Bombs&lt;/small&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#" class="profile"&gt;View Profile &lt;small&gt;View Profile&lt;/small&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#" class="editprofile"&gt;Edit Profile &lt;small&gt;Edit Profile&lt;/small&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#" class="contacts"&gt;Contacts &lt;small&gt;Contacts&lt;/small&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#" class="messages"&gt;Messages (10) &lt;small&gt;Messages&lt;/small&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#" class="playlist"&gt;Play List &lt;small&gt;Play List&lt;/small&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="#" class="videos"&gt;Videos &lt;small&gt;Videos&lt;/small&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;li id="alertpanel"&gt;&lt;a href="#" class="alerts"&gt;Alerts&lt;/a&gt;&lt;/li&gt;
        &lt;li id="chatpanel"&gt;&lt;a href="#" class="chat"&gt;Friends (&lt;strong&gt;18&lt;/strong&gt;)&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;</pre>
<h4>CSS</h4>
<p>First start by fixing the panel to the bottom of the viewport.</p>
<pre>#footpanel {
	position: fixed;
	bottom: 0; left: 0;
	z-index: 9999; <span style="color: #999;">/*--Keeps the panel on top of all other elements--*/</span>
	background: #e3e2e2;
	border: 1px solid #c3c3c3;
	border-bottom: none;
	width: 94%;
	margin: 0 3%;
}</pre>
<p>As you may already know, IE6 does not understand fixed positioning. I stumbled across a <a href="http://www.gunlaug.no/contents/wd_additions_15.html" target="_blank">tutorial</a> that fixed this problem*. </p>
<pre>*html #footpanel { <span style="color: #999;">/*--IE6 Hack - Fixed Positioning to the Bottom--*/</span>
	margin-top: -1px; <span style="color: #999;">/*--Prevents IE6 from having an infinity scroll bar - due to 1px border on #footpanel--*/</span>
	position: absolute;
	top:expression(eval(document.compatMode &amp;&amp;document.compatMode=='CSS1Compat') ?documentElement.scrollTop+(documentElement.clientHeight-this.clientHeight) : document.body.scrollTop +(document.body.clientHeight-this.clientHeight));
}</pre>
<p>*Note: Due to heavy loading on the browser, an alternative solution would be to either use an <code>position: absolute;</code> or if the situation/client allows it use <code>display: none;</code> for those with IE6.</p>
<p>Style the unordered list which will be the foundation of this panel.</p>
<pre>#footpanel ul {
	padding: 0; margin: 0;
	float: left;
	width: 100%;
	list-style: none;
	border-top: 1px solid #fff; <span style="color: #999;">/*--Gives the bevel feel on the panel--*/</span>
	font-size: 1.1em;
}
#footpanel ul li{
	padding: 0; margin: 0;
	float: left;
	position: relative;
}
#footpanel ul li a{
	padding: 5px;
	float: left;
	text-indent: -9999px; <span style="color: #999;">/*--For text replacement - Shove text off of the page--*/</span>
	height: 16px; width: 16px;
	text-decoration: none;
	color: #333;
	position: relative;
}
html #footpanel ul li a:hover{	background-color: #fff; }
html #footpanel ul li a.active { <span style="color: #999;">/*--Active state when sub-panel is open--*/</span>
	background-color: #fff;
	height: 17px;
	margin-top: -2px; <span style="color: #999;">/*--Push it up 2px to attach the active button to sub-panel--*/</span>
	border: 1px solid #555;
	border-top: none;
	z-index: 200; <span style="color: #999;">/*--Keeps the active link on top of the sub-panel--*/</span>
	position: relative;
}</pre>
<p><img class="center" src="http://www.sohtanaka.com/web-design/examples/footer-panel/03_tooltip.gif" alt="Tooltip Demo" /></p>
<p>Declare the text replacement for each link.<br />
<small>You can download these great icons by <a href="http://pinvoke.com/" target="_blank">Pinvoke here</a>.</small></p>
<pre>#footpanel a.home{
	background: url(home.png) no-repeat 15px center;
	width: 50px;
	padding-left: 40px;
	border-right: 1px solid #bbb;
	text-indent: 0; <span style="color: #999;">/*--Reset text indent since there will be a combination of both text and image--*/</span>
}
a.profile{ background: url(user.png) no-repeat center center;  }
a.editprofile{ background: url(wrench_screwdriver.png) no-repeat center center; }
a.contacts{ background: url(address_book.png) no-repeat center center; }
a.messages{ background: url(mail.png) no-repeat center center; }
a.playlist{ background: url(document_music_playlist.png) no-repeat center center; }
a.videos{ background: url(film.png) no-repeat center center; }
a.alerts{ background: url(newspaper.png) no-repeat center center; }
#footpanel a.chat{
	background: url(balloon.png) no-repeat 15px center;
	width: 126px;
	border-left: 1px solid #bbb;
	border-right: 1px solid #bbb;
	padding-left: 40px;
	text-indent: 0; <span style="color: #999;">/*--Reset text indent since there will be a combination of both text and image--*/</span>
}
#footpanel li#chatpanel, #footpanel li#alertpanel {	float: right; }  <span style="color: #999;">/*--Right align the chat and alert panels--*/</span></pre>
<p><img class="center" src="http://www.sohtanaka.com/web-design/examples/footer-panel/04_tooltip.gif" alt="Tooltip Demo" /></p>
<p>Style the tooltip bubble, by default the <strong><code>&lt;small&gt;</code></strong> tag will be hidden with a <strong><code>display:none;</code></strong>. On hover over, allow the tooltip to appear with a <strong><code>display:block;</code></strong></p>
<pre>#footpanel a small {
	text-align: center;
	width: 70px;
	background: url(pop_arrow.gif) no-repeat center bottom;
	padding: 5px 5px 11px;
	display: none; <span style="color: #999;">/*--Hide by default--*/</span>
	color: #fff;
	font-size: 1em;
	text-indent: 0;
}
#footpanel a:hover small{
	display: block; <span style="color: #999;">/*--Show on hover--*/</span>
	position: absolute;
	top: -35px; <span style="color: #999;">/*--Position tooltip 35px above the list item--*/</span>
	left: 50%;
	margin-left: -40px; <span style="color: #999;">/*--Center the tooltip--*/</span>
	z-index: 9999;
}</pre>
<div class="highlight">
<p><a class="view" href="http://www.sohtanaka.com/web-design/examples/footer-panel/tooltip.htm" target="_blank">Part 1 Demo</a> | <a class="view" href="http://www.sohtanaka.com/web-design/examples/footer-panel/" target="_blank">Final Demo</a></div>
<h4>What&#8217;s Next?</h4>
<p>Part 2 of this tutorial will go over how to style the sub-panels and how to activate them using jQuery. If anyone had any questions or comments regarding the tooltip technique, please let me know!<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-2/" rel="bookmark" title="December 7, 2009">Facebook Style Footer Admin Panel Part 2</a></li>
<li><a href="http://www.sohtanaka.com/web-design/side-navigation-tooltip-popup-bubble/" rel="bookmark" title="March 10, 2009">Side Navigation Tooltip / Popup Bubble</a></li>
<li><a href="http://www.sohtanaka.com/web-design/styling-post-headings-that-stick-out/" rel="bookmark" title="October 4, 2009">Styling Post Headings That Stick Out</a></li>
<li><a href="http://www.sohtanaka.com/web-design/css-vertical-navigation-with-teaser/" rel="bookmark" title="December 15, 2008">CSS Vertical Navigation with Teaser</a></li>
<li><a href="http://www.sohtanaka.com/web-design/fancy-thumbnail-hover-effect-w-jquery/" rel="bookmark" title="April 19, 2009">Fancy Thumbnail Hover Effect w/ jQuery</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-1/feed/</wfw:commentRss>
		<slash:comments>70</slash:comments>
		</item>
		<item>
		<title>Guest Post &#8211; 5 Useful Coding Solutions Part 2</title>
		<link>http://www.sohtanaka.com/web-design/guest-post-5-useful-coding-solutions-part-2/</link>
		<comments>http://www.sohtanaka.com/web-design/guest-post-5-useful-coding-solutions-part-2/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 19:04:33 +0000</pubDate>
		<dc:creator>Soh</dc:creator>
				<category><![CDATA[CSS/XHTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[guest post]]></category>
		<category><![CDATA[Intermediate]]></category>

		<guid isPermaLink="false">http://www.sohtanaka.com/?p=2703</guid>
		<description><![CDATA[This is my second article/tutorial for Smashing Magazine.
Instead of writing a tutorial for CSS beginners, this time Vitaly Friedman (editor-in-chief of Smashing Magazine)  asked various questions regarding intermediate/advanced techniques found throughout the web, and how each of these methods were achieved.
Based on the live examples, I went ahead and broke them down on how [...]]]></description>
			<content:encoded><![CDATA[<p>This is my second article/tutorial for <a href="http://www.smashingmagazine.com/" target="_blank">Smashing Magazine</a>.<span id="more-2703"></span></p>
<p>Instead of writing a tutorial for CSS beginners, this time <a href="http://www.smashingmagazine.com/author/vitaly-friedman/" target="_blank">Vitaly Friedman</a> (editor-in-chief of Smashing Magazine)  asked various questions regarding intermediate/advanced techniques found throughout the web, and how each of these methods were achieved.</p>
<p>Based on the live examples, I went ahead and broke them down on how I would achieve each of these effects.</p>
<blockquote><p>This post is the the next installment of posts featuring &#8220;Useful Coding Solutions for Designers and Developers&#8221;, a series of posts focusing on unique and creative CSS/JavaScript-techniques being implemented by talented professionals in our industry. A key talent that any Web designer must acquire is the ability to observe, understand and build on other people&#8217;s designs. This is a great way to develop the skills and techniques necessary to produce effective websites.</p></blockquote>
<p><a href="http://www.smashingmagazine.com/2009/11/23/6-useful-coding-solutions-for-designers-and-developers/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/SM-2/post_image.jpg" alt="" /></a></p>
<div class="highlight">
<p><a class="view" href="http://www.smashingmagazine.com/2009/11/23/6-useful-coding-solutions-for-designers-and-developers/" target="_blank">View Article</a></div>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://www.sohtanaka.com/web-design/do-you-eat-and-run/" rel="bookmark" title="April 3, 2009">Do You Eat and Run?</a></li>
<li><a href="http://www.sohtanaka.com/web-design/learning-one-step-at-a-time/" rel="bookmark" title="February 15, 2010">Learning One Step at a Time</a></li>
<li><a href="http://www.sohtanaka.com/web-design/recommended-magazine-web-designer/" rel="bookmark" title="October 17, 2008">Recommended Magazine &#8211; <em>Web Designer</em></a></li>
<li><a href="http://www.sohtanaka.com/web-design/mastering-css-getting-started-guest-post/" rel="bookmark" title="October 5, 2009">Mastering CSS : Getting Started &#8211; Guest Post</a></li>
<li><a href="http://www.sohtanaka.com/web-design/what-are-rss-feeds/" rel="bookmark" title="November 20, 2008">Why Designers Should Subscribe to RSS Feeds</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sohtanaka.com/web-design/guest-post-5-useful-coding-solutions-part-2/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Mega Drop Down Menus w/ CSS &amp; jQuery</title>
		<link>http://www.sohtanaka.com/web-design/mega-drop-downs-w-css-jquery/</link>
		<comments>http://www.sohtanaka.com/web-design/mega-drop-downs-w-css-jquery/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 08:29:31 +0000</pubDate>
		<dc:creator>Soh</dc:creator>
				<category><![CDATA[CSS/XHTML]]></category>
		<category><![CDATA[Advanced]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[navigation]]></category>

		<guid isPermaLink="false">http://www.sohtanaka.com/?p=2604</guid>
		<description><![CDATA[While in the process of redesigning 4wheelparts.com, I decided to explore new methods of working with our huge number of inventory and categories. I did some research and noticed a new trend for ecommerce sites in having what they call &#8220;mega drop down menus&#8221;.
According to usability expert Jakob Nielson, mega drop down menus tested to [...]]]></description>
			<content:encoded><![CDATA[<p>While in the process of redesigning 4wheelparts.com, I decided to explore new <span id="more-2604"></span>methods of working with our huge number of inventory and categories. I did some research and noticed a new trend for ecommerce sites in having what they call &#8220;mega drop down menus&#8221;.</p>
<p>According to usability expert Jakob Nielson, mega drop down menus tested to be more efficient for large scale websites. I decided to experiment with different ways of implementing this technique and would like to share how I achieved this method.</p>
<blockquote><p>Given that regular drop-down menus are rife with usability problems, it takes a lot for me to recommend a new form of drop-down. But, as our testing videos show, mega drop-downs overcome the downsides of regular drop-downs. Thus, I can recommend one while warning against the other.  &#8211; <a href="http://www.useit.com/alertbox/mega-dropdown-menus.html" target="_blank">Jakob Nielsen &#8211; Alert Box</a></p></blockquote>
<p>As I read his article he recommended that these kind of drop down menus should have a subtle time delay when hovering in and out of them. I decided to use the <a href="http://cherne.net/brian/resources/jquery.hoverIntent.html" target="_blank">Hover Intent jQuery plugin</a> to help me achieve this effect.</p>
<p><a href="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/demo.jpg" alt="Mega Drop Down Menu - CSS &amp; jQuery" /></a></p>
<div class="highlight">
<p><a class="view" href="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/" target="_blank">View Demo</a></div>
<h4>Step 1. Foundation &#8211; HTML</h4>
<p>Just like all of my navigation tutorials, start by creating an unordered list. Since we will be using <a href="http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/" target="_blank">CSS Sprites</a> for our navigation states, each link within the list item should have a unique class name to it.</p>
<pre>&lt;ul id="topnav"&gt;
    &lt;li&gt;&lt;a href="#" class="home"&gt;Home&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#" class="products"&gt;Products&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#" class="sale"&gt;Sale&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#" class="community"&gt;Community&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#" class="store"&gt;Store Locator&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<h4>Step 2. Styling Foundation &#8211; CSS</h4>
<p>Since our drop down menu will be using <a href="http://www.smashingmagazine.com/2009/10/05/mastering-css-coding-getting-started/#CSS-Basics7" target="_blank ">absolute positioning</a>, be sure to add a relative positioning to the list item. Shoot the text off of the page by specifying a text-indent of -9999px. We will then replace each navigation link with an image by specifying an image path to each link class name.</p>
<pre>ul#topnav {
	margin: 0; padding: 0;
	float:left;
	width: 100%;
	list-style: none;
	font-size: 1.1em;
}
ul#topnav li {
	float: left;
	margin: 0; padding: 0;
	position: relative; <span style="color: #999;">/*--Important--*/</span>
}
ul#topnav li a {
	float: left;
	text-indent: -9999px; <span style="color: #999;">/*--Push text off of page--*/</span>
	height: 44px;
}
ul#topnav li:hover a, ul#topnav li a:hover { background-position: left bottom; } <span style="color: #999;">/*--Hover State--*/</span>
ul#topnav a.home {
	background: url(nav_home.png) no-repeat;
	width: 78px;
}
ul#topnav a.products {
	background: url(nav_products.png) no-repeat;
	width: 117px;
}
ul#topnav a.sale {
	background: url(nav_sale.png) no-repeat;
	width: 124px;
}
ul#topnav a.community {
	background: url(nav_community.png) no-repeat;
	width: 124px;
}
ul#topnav a.store {
	background: url(nav_store.png) no-repeat;
	width: 141px;
}</pre>
<h4>Step 3. Creating the Mega Sub Navigation &#8211; HTML</h4>
<p>Add a class of &#8220;sub&#8221; right after your main navigation link and nest unordered lists within. Each nested unordered list will act as the nav columns of your mega drop down.<br />
<img class="center" src="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/subnav_1.jpg" alt="Mega Drop Down Menu" /></p>
<pre><span style="color: #999;">
&lt;ul id="topnav"&gt;
    &lt;li&gt;&lt;a href="#" class="home"&gt;Home&lt;/a&gt;&lt;/li&gt;</span>
    &lt;li&gt;
    	&lt;a href="#" class="products"&gt;Products&lt;/a&gt;
        <strong>&lt;div class="sub"&gt;</strong>
            &lt;ul&gt;
                &lt;li&gt;&lt;h2&gt;&lt;a href="#"&gt;Desktop&lt;/a&gt;&lt;/h2&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#"&gt;Navigation Link&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#"&gt;Navigation Link&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
            &lt;ul&gt;
                &lt;li&gt;&lt;h2&gt;&lt;a href="#"&gt;Laptop&lt;/a&gt;&lt;/h2&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#"&gt;Navigation Link&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#"&gt;Navigation Link&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
            &lt;ul&gt;
                &lt;li&gt;&lt;h2&gt;&lt;a href="#"&gt;Accessories&lt;/a&gt;&lt;/h2&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#"&gt;Navigation Link&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#"&gt;Navigation Link&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
            &lt;ul&gt;
                &lt;li&gt;&lt;h2&gt;&lt;a href="#"&gt;Accessories&lt;/a&gt;&lt;/h2&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#"&gt;Navigation Link&lt;/a&gt;&lt;/li&gt;
                &lt;li&gt;&lt;a href="#"&gt;Navigation Link&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
        <strong>&lt;/div&gt;</strong>
    &lt;/li&gt;
    <span style="color: #999;">&lt;li&gt;&lt;a href="#" class="sale"&gt;Sale&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#" class="community"&gt;Community&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#" class="store"&gt;Store Locator&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</span></pre>
<h4>Step 4. Styling Mega Sub Navigation &#8211; CSS</h4>
<p>To get the sub nav to stick to the bottom left corner of the parent hovered nav, be sure to set an absolute position to the .sub container with the coordinate of top 44px and left 0px. For style, I added rounded corners to those browsers that support it (Firefox/Chrome/Safari).</p>
<p>Keep in mind when having multiple levels of nested lists, you need to override its conflicting properties. Check out the comments below.</p>
<pre>ul#topnav li .sub {
	position: absolute; <span style="color: #999;">/*--Important--*/</span>
	top: 44px; left: 0;
	background: #344c00 url(sub_bg.png) repeat-x; <span style="color: #999;">/*--Background gradient--*/</span>
	padding: 20px 20px 20px;
	float: left;
	<span style="color: #999;">/*--Bottom right rounded corner--*/</span>
	-moz-border-radius-bottomright: 5px;
	-khtml-border-radius-bottomright: 5px;
	-webkit-border-bottom-right-radius: 5px;
	<span style="color: #999;">/*--Bottom left rounded corner--*/</span>
	-moz-border-radius-bottomleft: 5px;
	-khtml-border-radius-bottomleft: 5px;
	-webkit-border-bottom-left-radius: 5px;
	display: none; <span style="color: #999;">/*--Hidden for those with js turned off--*/</span>
}
ul#topnav li .row { <span style="color: #999;">/*--If needed to break out into rows--*/</span>
	clear: both;
	float: left;
	width: 100%;
	margin-bottom: 10px;
}
ul#topnav li .sub ul{
	list-style: none;
	margin: 0; padding: 0;
	width: 150px;
	float: left;
}
ul#topnav .sub ul li {
	width: 100%; <span style="color: #999;">/*--Override parent list item--*/</span>
	color: #fff;
}
ul#topnav .sub ul li h2 { <span style="color: #999;">/*--Sub nav heading style--*/</span>
	padding: 0;  margin: 0;
	font-size: 1.3em;
	font-weight: normal;
}
ul#topnav .sub ul li h2 a { <span style="color: #999;">/*--Sub nav heading link style--*/</span>
	padding: 5px 0;
	background-image: none;
	color: #e8e000;
}
ul#topnav .sub ul li a {
	float: none;
	text-indent: 0; <span style="color: #999;">/*--Override text-indent from parent list item--*/</span>
	height: auto; <span style="color: #999;">/*--Override height from parent list item--*/</span>
	background: url(navlist_arrow.png) no-repeat 5px 12px;
	padding: 7px 5px 7px 15px;
	display: block;
	text-decoration: none;
	color: #fff;
}
ul#topnav .sub ul li a:hover {
	color: #ddd;
	background-position: 5px 12px ;<span style="color: #999;">/*--Override background position--*/</span>
}</pre>
<h4>Step 5. Setting up jQuery &amp; Hover Intent</h4>
<p><small>For those who are not familiar with <a href="http://www.jquery.com" target="_blank">jQuery</a>, do check out their site first and get an overview of how it works. I’ve shared a <a href="http://www.sohtanaka.com/web-design/tag/jquery/" target="_blank">few tricks</a> that I have picked up along the way, you can check those out as well.</small></p>
<p><strong>Initial Step – Call the jQuery file</strong></p>
<p>You can choose to <a href="http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.2.min.js&amp;downloadBtn=" target="_blank">download</a> the file from the jQuery site, or you can use this one hosted on Google.</p>
<pre>&lt;script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"&gt;&lt;/script&gt;</pre>
<p>After calling the jQuery file, visit and download the latest <a href="http://cherne.net/brian/resources/jquery.hoverIntent.html" target="_blank">Hover Intent jQuery Plugin</a>. Save the file to your current directory, and call the file.</p>
<pre>&lt;script type="text/javascript" src="jquery.hoverIntent.minified.js"&gt;&lt;/script&gt;</pre>
<h4>Step 6. Launching Code on Document Ready</h4>
<p>Directly after the line where you called your jQuery and hover intent file, start a new &lt;script&gt; tag and start your code by using the $(document).ready event. This allows your jQuery code to run the instant the DOM is ready to be manipulated. The code you will be writing in the next few steps will all take place within.</p>
<pre>$(document).ready(function() {
	<span style="color:#999;">//Code goes here</span>
});</pre>
<h4>Step 7. Set Hover Over &amp; Hover Out Events &#8211; jQuery</h4>
<p>Note: When using the hover intent plugin, it requires each hover over and hover out state to be in its own function.</p>
<p><strong>The Logic</strong></p>
<p>When a drop down parent link is hovered over:</p>
<ol>
<li>Find .sub and fade it in (By default, we will fade the opacity down to 0)</li>
<li>Check if a .row exists (in case you want more than one row in the drop down)</li>
<li>If .row does exists, find the widest row and set the width of the .sub container.</li>
<li>If .row does <strong>not</strong> exist, set the width of the .sub container.</li>
</ol>
<p>On hover out:</p>
<ol>
<li>Find .sub and fade it out (Opacity 0)</li>
<li>Hide .sub (Display none &#8211; so it is completely out of the way)</li>
</ol>
<p>The following script contains comments explaining which jQuery actions are being performed.</p>
<pre><span style="color: #888888;">//On Hover Over</span>
function megaHoverOver(){
    $(this).find(".sub").stop().fadeTo('fast', 1).show(); <span style="color: #888888;">//Find sub and fade it in</span>
    (function($) {
        <span style="color: #999999;">//Function to calculate total width of all ul's</span>
        jQuery.fn.calcSubWidth = function() {
            rowWidth = 0;
            <span style="color: #999999;">//Calculate row</span>
            $(this).find("ul").each(function() { <span style="color: #999999;">//for each ul...</span>
                rowWidth += $(this).width(); <span style="color: #999999;">//Add each ul's width together</span>
            });
        };
    })(jQuery); 

    if ( $(this).find(".row").length &gt; 0 ) { <span style="color: #999999;">//If row exists...</span>

        var biggestRow = 0;	

        $(this).find(".row").each(function() {	<span style="color: #999999;">//for each row...</span>
            $(this).calcSubWidth(); <span style="color: #999999;">//Call function to calculate width of all ul's</span>
            <span style="color: #999999;">//Find biggest row</span>
            if(rowWidth &gt; biggestRow) {
                biggestRow = rowWidth;
            }
        });

        $(this).find(".sub").css({'width' :biggestRow});<span style="color: #999999;"> //Set width</span>
        $(this).find(".row:last").css({'margin':'0'});  <span style="color: #999999;">//Kill last row's margin</span>

    } else { <span style="color: #999999;">//If row does not exist...</span>

        $(this).calcSubWidth(); <span style="color: #999999;"> //Call function to calculate width of all ul's</span>
        $(this).find(".sub").css({'width' : rowWidth});<span style="color: #999999;"> //Set Width</span>

    }
}
<span style="color: #888888;">//On Hover Out</span>
function megaHoverOut(){
  $(this).find(".sub").stop().fadeTo('fast', 0, function() { <span style="color: #999999;">//Fade to 0 opactiy</span>
      $(this).hide();  <span style="color: #999999;">//after fading, hide it</span>
  });
}</pre>
<h4>Step 8. Set Custom Configurations &amp; Trigger Function</h4>
<p>Now that we declared the hover over and hover out function in the above step, its now time to set the custom configurations and call the hover intent function.</p>
<pre><span style="color: #888888;">//Set custom configurations</span>
var config = {
     sensitivity: 2, <span style="color: #888888;">// number = sensitivity threshold (must be 1 or higher)</span>
     interval: 100, <span style="color: #888888;">// number = milliseconds for onMouseOver polling interval</span>
     over: megaHoverOver, <span style="color: #888888;">// function = onMouseOver callback (REQUIRED)</span>
     timeout: 500, <span style="color: #888888;">// number = milliseconds delay before onMouseOut</span>
     out: megaHoverOut <span style="color: #888888;">// function = onMouseOut callback (REQUIRED)</span>
};

$("ul#topnav li .sub").css({'opacity':'0'}); <span style="color: #888888;">//Fade sub nav to 0 opacity on default
</span>$("ul#topnav li").hoverIntent(config); <span style="color: #888888;">//Trigger Hover intent with custom configurations</span></pre>
<p>For more detailed explanation of how hover intent works, check out <a href="http://cherne.net/brian/resources/jquery.hoverIntent.html">their website</a>.</p>
<h4>Conclusion</h4>
<p>Keep in mind that this script calculates the width of your .sub container (adding up all UL&#8217;s per row) and automatically adjusts it. If you would like to specify your own custom width, you can delete that portion of the code and specify a static width in your CSS. This all depends on what you are trying to add in your mega drop down, and each scenario may be different. I hope you grasped the basic concepts of this tutorial so you can make your own custom mega drop down for future projects. If you have any questions, concerns, or suggestions, please let me know!</p>
<p><a href="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/demo.jpg" alt="Mega Drop Down Menu - CSS &amp; jQuery" /></a></p>
<div class="highlight">
<p><a class="view" href="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/" target="_blank">View Demo</a></div>
<h4>Inspiration Elsewhere</h4>
<p>Now that you know how to create a mega drop down from scratch, check out some of these sites for inspiration.<br />
<a href="http://www.shop.puma.com/on/demandware.store/Sites-Puma-US-Site/en/Home-Show?source=marketing" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/puma.jpg" alt="Mega Drop Menu" /></a><br />
<a href="http://m.www.yahoo.com/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/yahoo.jpg" alt="Mega Drop Menu" /></a><br />
<a href="http://www.virgin.com/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/virgin.jpg" alt="Mega Drop Menu" /></a><br />
<a href="http://www.whitehouse.gov/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/whitehouse.jpg" alt="Mega Drop Menu" /></a><br />
<a href="http://www.rei.com/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/rei.jpg" alt="Mega Drop Menu" /></a><br />
<a href="http://www.gateway.com/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/gateway.jpg" alt="Mega Drop Menu" /></a><br />
<a href="http://www.billabong.com/us/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/mega-dropdowns/billabong.jpg" alt="Mega Drop Menu" /></a></p>
<h4>Related Articles</h4>
<ul>
<li><a href="http://www.smashingmagazine.com/2009/03/24/designing-drop-down-menus-examples-and-best-practices/" target="_blank">Designing Drop-Down Menus: Examples and Best Practices</a></li>
<li><a href="http://cherne.net/brian/resources/jquery.hoverIntent.html" target="_blank">Hover Intent</a></li>
<li><a href="http://www.useit.com/alertbox/mega-dropdown-menus.html" target="_blank">Mega Drop-Down Navigation Menus Work Well</a></li>
</ul>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://www.sohtanaka.com/web-design/horizontal-sub-nav-with-css-jquery/" rel="bookmark" title="July 13, 2009">Horizontal Subnav with CSS</a></li>
<li><a href="http://www.sohtanaka.com/web-design/animate-navigation-with-css-jquery/" rel="bookmark" title="July 28, 2009">Animated Navigation with CSS &#038; jQuery</a></li>
<li><a href="http://www.sohtanaka.com/web-design/active-state-in-css-navigations/" rel="bookmark" title="August 30, 2009">&#8220;Active&#8221; State in CSS Navigations</a></li>
<li><a href="http://www.sohtanaka.com/web-design/side-navigation-tooltip-popup-bubble/" rel="bookmark" title="March 10, 2009">Side Navigation Tooltip / Popup Bubble</a></li>
<li><a href="http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/" rel="bookmark" title="July 1, 2009">Simple Tabs w/ CSS &#038; jQuery</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sohtanaka.com/web-design/mega-drop-downs-w-css-jquery/feed/</wfw:commentRss>
		<slash:comments>149</slash:comments>
		</item>
		<item>
		<title>Mastering CSS : Getting Started &#8211; Guest Post</title>
		<link>http://www.sohtanaka.com/web-design/mastering-css-getting-started-guest-post/</link>
		<comments>http://www.sohtanaka.com/web-design/mastering-css-getting-started-guest-post/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 15:42:34 +0000</pubDate>
		<dc:creator>Soh</dc:creator>
				<category><![CDATA[CSS/XHTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[guest post]]></category>

		<guid isPermaLink="false">http://www.sohtanaka.com/?p=2591</guid>
		<description><![CDATA[I have been a die hard fan of smashingmagazine for a while now, and it was an honor being able to write for them. I have covered a lot of &#8220;how-to&#8221; type articles, and so I wanted to challenge myself with a very basic CSS guide. I never realized how difficult it was trying to [...]]]></description>
			<content:encoded><![CDATA[<p>I have been a die hard fan of smashingmagazine for a while now, and it was<span id="more-2591"></span> an honor being able to write for them. I have covered a lot of &#8220;how-to&#8221; type articles, and so I wanted to challenge myself with a very basic CSS guide. I never realized how difficult it was trying to explain the most simple techniques. It was quite a challenge and I hope I did a good job so the beginners can easily understand.</p>
<p>If anyone has any advice, requests, or suggestions for my future guest post articles, please let me know. I&#8217;m constantly trying to better myself and it would appreciate your support <img src='http://www.sohtanaka.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://www.smashingmagazine.com/2009/10/05/mastering-css-coding-getting-started/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/mastering-css/demo.gif" alt="Mastering CSS - CSS Basics" /></a></p>
<div class="highlight">
<p><a class="view" href="http://www.smashingmagazine.com/2009/10/05/mastering-css-coding-getting-started/" target="_blank">View Article</a></div>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://www.sohtanaka.com/web-design/guest-post-5-useful-coding-solutions-part-2/" rel="bookmark" title="November 23, 2009">Guest Post &#8211; 5 Useful Coding Solutions Part 2</a></li>
<li><a href="http://www.sohtanaka.com/web-design/print-css-javascript-icons/" rel="bookmark" title="October 31, 2008">Using Print Stylesheets Effectively</a></li>
<li><a href="http://www.sohtanaka.com/web-design/css-beginners-do%e2%80%99s-and-dont%e2%80%99s-part-2/" rel="bookmark" title="June 8, 2009">CSS Beginners Do’s and Dont’s Part 2</a></li>
<li><a href="http://www.sohtanaka.com/web-design/learning-one-step-at-a-time/" rel="bookmark" title="February 15, 2010">Learning One Step at a Time</a></li>
<li><a href="http://www.sohtanaka.com/web-design/css-beginners-dos-and-donts-part-1/" rel="bookmark" title="April 27, 2009">CSS Beginners Do&#8217;s and Dont&#8217;s Part 1</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sohtanaka.com/web-design/mastering-css-getting-started-guest-post/feed/</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Styling Post Headings That Stick Out</title>
		<link>http://www.sohtanaka.com/web-design/styling-post-headings-that-stick-out/</link>
		<comments>http://www.sohtanaka.com/web-design/styling-post-headings-that-stick-out/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 06:14:42 +0000</pubDate>
		<dc:creator>Soh</dc:creator>
				<category><![CDATA[CSS/XHTML]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://www.sohtanaka.com/?p=2549</guid>
		<description><![CDATA[Recently, I&#8217;ve noticed a trend in blog post headings where it sticks out of its base layout. I would like to share this technique for those who would like to give their post headings a new style. One tip to keep in mind when designing this is to make sure it fits your target audience [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I&#8217;ve noticed a trend in blog post headings where it sticks out of <span id="more-2549"></span>its base layout. I would like to share this technique for those who would like to give their post headings a new style. One tip to keep in mind when designing this is to make sure it fits your target audience screen resolution size.</p>
<p>Note that this technique may vary depending on your design. My goal is for you to grasp the main concept in this tutorial so you can experiment and apply it to your own projects.</p>
<p><a href="http://www.sohtanaka.com/web-design/examples/blog-date-header/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/blog-date-header/final.gif" alt="Post Heading That Sticks Out" /></a></p>
<div class="highlight">
<p><a class="view" href="http://www.sohtanaka.com/web-design/examples/blog-date-header/" target="_blank">View Demo</a></div>
<h4>Step 1. Wireframe &#8211; HTML</h4>
<p>Start by visualizing the wireframe of how each post item will be laid out.</p>
<pre>&lt;div class="post"&gt;
	&lt;div class="postheader"&gt;
		<span style="color: #999;">&lt;!--Post Header Elements Goes Here--&gt;</span>
	&lt;/div&gt;
	<span style="color: #999;">&lt;!--Post Content Goes Here--&gt;</span>
&lt;/div&gt;</pre>
<h4>Step 2. Styling Wireframe &#8211; CSS</h4>
<p>Each post entry will be wrapped within the .post class. Since we are using absolute positioning on the .postheader, be sure to add enough top padding on .post so the post content does not overlap with the heading.</p>
<p><img class="center" src="http://www.sohtanaka.com/web-design/examples/blog-date-header/visual.gif" alt="Post Heading That Sticks Out" /></p>
<pre>.post {
	margin: 0; padding: 110px 20px 20px;
	float: left;
	width: 560px;
	position: relative;
}
.post .postheader {
	background: url(postheader_bg.gif) repeat-x;
	float: left;
	width: 600px;
	position: absolute;
	left: 0; top: 0;
}</pre>
<h4>Step 3. Post Header Wireframe &#8211; HTML</h4>
<p>Now we&#8217;ll look closer at how each element will be placed within the .postheader.<br />
<img class="center" src="http://www.sohtanaka.com/web-design/examples/blog-date-header/visual_1.gif" alt="Post Heading That Sticks Out" /></p>
<pre>&lt;div class="postheader"&gt;
	&lt;span class="date"&gt;&lt;strong&gt;Oct&lt;/strong&gt;25 &lt;small&gt;2009&lt;/small&gt;&lt;/span&gt;
	&lt;h2&gt;&lt;a href="#"&gt;Styling Blog Post Headers with CSS&lt;/a&gt;&lt;/h2&gt;
	&lt;a href="#" class="comments"&gt;25&lt;/a&gt;
	&lt;p&gt;
		&lt;span&gt;Category: &lt;a href="#"&gt;CSS&lt;/a&gt; | Tags: &lt;a href="#"&gt;Headings&lt;/a&gt;, &lt;a href="#"&gt;Tutorials&lt;/a&gt;&lt;/span&gt;
		By &lt;a href="#"&gt;Soh Tanaka&lt;/a&gt;
	&lt;/p&gt;
&lt;/div&gt;</pre>
<h4>Step 4. Styling Post Header &#8211; CSS</h4>
<p><strong>Date Style</strong><br />
The part that sticks out of the layout is the date. Set the positioning to absolute and pull it back -50px to the left.<br />
<img class="center" src="http://www.sohtanaka.com/web-design/examples/blog-date-header/visual_2.gif" alt="Post Heading That Sticks Out" /></p>
<pre>.date {
	background: url(date_bg.gif) no-repeat;
	width: 46px; height: 57px;
	float: left;
	padding: 3px 5px 3px 0;
	text-align: center;
	font-size: 1.8em;
	position: absolute;
	left: -50px; top: 0;
}
.date strong, .date small {
	font-size: 0.5em;
	text-transform: uppercase;
	display: block;
}</pre>
<p><strong>Comments Style</strong><br />
Similar to how we styled the date, we will use absolute positioning to push the comments block -10px to the top and -10px to the right.<br />
<img class="center" src="http://www.sohtanaka.com/web-design/examples/blog-date-header/visual_3.gif" alt="Post Heading That Sticks Out" /></p>
<pre>a.comments {
	position: absolute;
	right: -10px; top: -10px;
	background: url(comment_bubble.gif) no-repeat;
	width: 34px; height: 39px;
	padding: 7px 0 0;
	text-align: center;
	color: #fff;
	font-size: 1.6em;
	text-decoration: none;
}</pre>
<p><strong>Level 2 Heading Style</strong><br />
Since the comments area is bleeding over on top of the heading, make sure you have enough padding on the right side so it does not overlap. Set height and line-height to match so it can be vertically aligned. For those browsers that support text shadows, we can add a nice touch of letter press style using the text-shadow property.</p>
<pre>.post .postheader h2 {
	margin: 0; padding: 0 25px 0 10px;
	font: normal 2.2em Georgia, "Times New Roman", Times, serif;
	height: 62px; line-height: 62px;
	text-shadow: 1px 1px 1px #cfeb7f;
}
.post .postheader h2 a {
	text-decoration: none;
	color: #222;
	display: block;
}</pre>
<p><strong>Auxiliary Information Style</strong><br />
The aux information will be wrapped in a paragraph tag. To accommodate for the background image, be sure to add 60px padding to the left. For the category and tag information, wrap it in a span which will be floated to the right.</p>
<pre>.post .postheader p{
	font-size: 0.9em;
	background: url(author_bg.gif) no-repeat 10px bottom;
	height: 27px; line-height: 27px;
	margin: 0; padding: 0 10px 0 60px;
	color: #fff;
}
.postheader p a {color: #fff;}
.postheader p span {float: right;}</pre>
<p><a href="http://www.sohtanaka.com/web-design/examples/blog-date-header/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/blog-date-header/final.gif" alt="Post Heading That Sticks Out" /></a></p>
<div class="highlight">
<p><a class="view" href="http://www.sohtanaka.com/web-design/examples/blog-date-header/" target="_blank">View Demo</a></div>
<h4>Conclusion</h4>
<p>Now that you know how this technique is achieved, check out some of the sites below for inspiration! If you have any questions, suggestions, or concerns, please don&#8217;t hesitate to let me know.</p>
<p><strong><a href="http://www.usabilitypost.com/" target="_blank">Usability Post</a></strong><br />
<a href="http://www.usabilitypost.com/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/blog-date-header/usabilitypost.gif" alt="Post Heading That Sticks Out" /></a></p>
<p><strong><a href="http://line25.com/" target="_blank">Line 25</a></strong><br />
<a href="http://line25.com/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/blog-date-header/line25.gif" alt="Post Heading That Sticks Out" /></a></p>
<p><strong><a href="http://www.noupe.com/" target="_blank">Noupe</a></strong><br />
<a href="http://www.noupe.com/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/blog-date-header/noupe.gif" alt="Post Heading That Sticks Out" /></a></p>
<p><strong><a href="http://www.from-the-couch.com" target="_blank">From the Couch</a></strong><br />
<a href="http://www.from-the-couch.com" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/blog-date-header/fromthecouch.gif" alt="Post Heading That Sticks Out" /></a></p>
<p><strong><a href="http://www.koodoz.com.au/klog/" target="_blank">Koodoz</a></strong><br />
<a href="http://www.koodoz.com.au/klog/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/blog-date-header/koodoz.gif" alt="Post Heading That Sticks Out" /></a></p>
<p><strong><a href="http://www.webdesignerwall.com/" target="_blank">Web Designer Wall</a></strong><br />
<a href="http://www.webdesignerwall.com/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/blog-date-header/webdesignerwall.gif" alt="Post Heading That Sticks Out" /></a></p>
<p><strong><a href="http://www.branded07.com/" target="_blank">Branded 07</a></strong><br />
<a href="http://www.branded07.com/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/blog-date-header/branded07.gif" alt="Post Heading That Sticks Out" /></a><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://www.sohtanaka.com/web-design/animate-navigation-with-css-jquery/" rel="bookmark" title="July 28, 2009">Animated Navigation with CSS &#038; jQuery</a></li>
<li><a href="http://www.sohtanaka.com/web-design/vertical-alignment-css/" rel="bookmark" title="December 24, 2008">Two Simple Ways to Vertically Align with CSS</a></li>
<li><a href="http://www.sohtanaka.com/web-design/side-navigation-tooltip-popup-bubble/" rel="bookmark" title="March 10, 2009">Side Navigation Tooltip / Popup Bubble</a></li>
<li><a href="http://www.sohtanaka.com/web-design/horizontal-sub-nav-with-css-jquery/" rel="bookmark" title="July 13, 2009">Horizontal Subnav with CSS</a></li>
<li><a href="http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-2/" rel="bookmark" title="December 7, 2009">Facebook Style Footer Admin Panel Part 2</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sohtanaka.com/web-design/styling-post-headings-that-stick-out/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Greyscale Hover Effect w/ CSS &amp; jQuery</title>
		<link>http://www.sohtanaka.com/web-design/greyscale-hover-effect-w-css-jquery/</link>
		<comments>http://www.sohtanaka.com/web-design/greyscale-hover-effect-w-css-jquery/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 07:56:35 +0000</pubDate>
		<dc:creator>Soh</dc:creator>
				<category><![CDATA[CSS/XHTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[Image Tricks]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.sohtanaka.com/?p=2508</guid>
		<description><![CDATA[A few months ago, James Padolsey introduced a cool greyscale technique for non-IE browsers. His technique inspired me to come up with a workaround with a similar effect.
My solution relies on CSS Sprites and a few lines of jQuery, but requires a bit of preparation before it can be implemented. It is not recommended for [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago, <a href="http://james.padolsey.com/">James Padolsey</a> introduced a cool <a href="http://james.padolsey.com/javascript/grayscaling-in-non-ie-browsers/">greyscale technique</a> for <span id="more-2508"></span>non-IE browsers. His technique inspired me to come up with a workaround with a similar effect.</p>
<p>My solution relies on CSS Sprites and a few lines of jQuery, but requires a bit of preparation before it can be implemented. It is not recommended for large scale projects and probably best for displaying portfolio pieces.</p>
<p><a href="http://www.sohtanaka.com/web-design/examples/hover-over-trick/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/hover-over-trick/demo.gif" alt="jQuery Hover Over Trick" /></a></p>
<div class="highlight">
<p><a class="view" href="http://www.sohtanaka.com/web-design/examples/hover-over-trick/" target="_blank">View Demo</a></div>
<h4>Wireframe &#8211; HTML</h4>
<p>First set up an unordered list which we will use as our foundation for the list<br />
of gallery images.</p>
<pre>&lt;ul class="gallery"&gt;
	&lt;li&gt;
		&lt;a href="#" class="thumb"&gt;&lt;span&gt;&lt;img src="image.gif" alt="" /&gt;&lt;/span&gt;&lt;/a&gt;
		&lt;h2&gt;&lt;a href="#"&gt;Image Name&lt;/a&gt;&lt;/h2&gt;
	&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>You will notice that each list will contain an image which is nested within a &lt;span&gt; tag. The &lt;span&gt; tag will be used to crop the image to only show its default state. Take a look at the image below to get a visual.</p>
<p><img class="center" src="http://www.sohtanaka.com/web-design/examples/hover-over-trick/step1_a.gif" alt="jQuery Hover Over Trick" /></p>
<h4>Styling &#8211; CSS</h4>
<p>We will style this up as a typical gallery. Only thing unique about the below CSS is that we have the &lt;span&gt; to crop our image as we demonstrated in the above example.</p>
<pre>ul.gallery {
	width: 708px; <span style="color: #999;">/*--Adjust width according to your scenario--*/</span>
	list-style: none;
	margin: 0; padding: 0;
}
ul.gallery li {
	float: left;
	margin: 10px; padding: 0;
	text-align: center;
	border: 1px solid #ccc;
	-moz-border-radius: 3px; <span style="color: #999;">/*--CSS3 Rounded Corners--*/</span>
	-khtml-border-radius: 3px; <span style="color: #999;">/*--CSS3 Rounded Corners--*/</span>
	-webkit-border-radius: 3px; <span style="color: #999;">/*--CSS3 Rounded Corners--*/</span>
	display: inline; <span style="color: #999;">/*--Gimp Fix aka IE6 Fix - Fixes double margin bug--*/</span>
}
ul.gallery li a.thumb {
	width: 204px; <span style="color: #999;">/*--Width of image--*/</span>
	height: 182px; <span style="color: #999;">/*--Height of image--*/</span>
	padding: 5px;
	border-bottom: 1px solid #ccc;
	cursor: pointer;
}
ul.gallery li span { <span style="color: #999;">/*--Used to crop image--*/</span>
	width: 204px;
	height: 182px;
	overflow: hidden;
	display: block;
}
ul.gallery li a.thumb:hover {
	background: #333; <span style="color: #999;">/*--Hover effect for browser with js turned off--*/</span>
}
ul.gallery li h2 {
	font-size: 1em;
	font-weight: normal;
	text-transform: uppercase;
	margin: 0; padding: 10px;
	background: #f0f0f0;
	border-top: 1px solid #fff; <span style="color: #999;">/*--Subtle bevel effect--*/</span>
}
ul.gallery li a {text-decoration: none; color: #777; display: block;}</pre>
<h4>Step 3. Animation – jQuery</h4>
<p><small>For those who are not familiar with <a href="http://www.jquery.com" target="_blank">jQuery</a>, do check out their site first and get an overview of how it works. I’ve shared a <a href="http://www.sohtanaka.com/web-design/tag/jquery/" target="_blank">few tricks</a> that I have picked up along the way, you can check those out as well.</small></p>
<p><strong>Initial Step – Call the jQuery file</strong></p>
<p>You can choose to <a href="http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.3.2.min.js&amp;downloadBtn=" target="_blank">download</a> the file from the jQuery site, or you can use this one hosted on Google.</p>
<pre>&lt;script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"&gt;&lt;/script&gt;</pre>
<p>The logic here will be to fade out the default thumbnail, and set a background image on the &lt;a&gt; tag. Using <a href="http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/" target="_blank">CSS Sprites</a>, we will position the image to the &#8216;bottom&#8217; so  the greyscaled thumbnail can seep through on hover over.</p>
<p>The following script contains comments explaining which jQuery actions are being performed.</p>
<p><strong>jQuery</strong></p>
<pre><span style="color: #999;">$(document).ready(function() {</span>

	$("ul.gallery li").hover(function() { <span style="color: #999;">//On hover...</span>

		var thumbOver = $(this).find("img").attr("src");<span style="color: #999;"> //Get image url and assign it to 'thumbOver'</span>

		<span style="color: #999;">//Set a background image(thumbOver) on the &lt;a&gt; tag - Set position to bottom</span>
		$(this).find("a.thumb").css({'background' : 'url(' + thumbOver + ') no-repeat center <strong>bottom</strong>'});

		<span style="color: #999;">//Animate the image to 0 opacity (fade it out)</span>
		$(this).find("span").stop().fadeTo('normal', 0 , function() {
			$(this).hide()<span style="color: #999;"> //Hide the image after fade</span>
		});
	} , function() { <span style="color: #999;">//on hover out...</span>
		<span style="color: #999;">//Fade the image to full opacity </span>
		$(this).find("span").stop().fadeTo('normal', 1).show();
	});

<span style="color: #999;">});</span></pre>
<p><a href="http://www.sohtanaka.com/web-design/examples/hover-over-trick/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/hover-over-trick/demo.gif" alt="jQuery Hover Over Trick" /></a></p>
<div class="highlight">
<p><a class="view" href="http://www.sohtanaka.com/web-design/examples/hover-over-trick/" target="_blank">View Demo</a></div>
<h4>Conclusion</h4>
<p>I&#8217;m sure there are various ways of achieving this technique. I decided to use CSS Sprites technique to prevent glitching on the initial hover over. If anyone has a better solution, have questions, or suggestions, please feel free to let me know!<strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://www.sohtanaka.com/web-design/fancy-thumbnail-hover-effect-w-jquery/" rel="bookmark" title="April 19, 2009">Fancy Thumbnail Hover Effect w/ jQuery</a></li>
<li><a href="http://www.sohtanaka.com/web-design/horizontal-sub-nav-with-css-jquery/" rel="bookmark" title="July 13, 2009">Horizontal Subnav with CSS</a></li>
<li><a href="http://www.sohtanaka.com/web-design/animate-navigation-with-css-jquery/" rel="bookmark" title="July 28, 2009">Animated Navigation with CSS &#038; jQuery</a></li>
<li><a href="http://www.sohtanaka.com/web-design/simple-tabs-w-css-jquery/" rel="bookmark" title="July 1, 2009">Simple Tabs w/ CSS &#038; jQuery</a></li>
<li><a href="http://www.sohtanaka.com/web-design/mega-drop-downs-w-css-jquery/" rel="bookmark" title="November 3, 2009">Mega Drop Down Menus w/ CSS &#038; jQuery</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sohtanaka.com/web-design/greyscale-hover-effect-w-css-jquery/feed/</wfw:commentRss>
		<slash:comments>78</slash:comments>
		</item>
		<item>
		<title>&#8220;Active&#8221; State in CSS Navigations</title>
		<link>http://www.sohtanaka.com/web-design/active-state-in-css-navigations/</link>
		<comments>http://www.sohtanaka.com/web-design/active-state-in-css-navigations/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 06:05:03 +0000</pubDate>
		<dc:creator>Soh</dc:creator>
				<category><![CDATA[CSS/XHTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[navigation]]></category>

		<guid isPermaLink="false">http://www.sohtanaka.com/?p=2363</guid>
		<description><![CDATA[I am sure you have been on a website where the navigation has an &#8220;active&#8221; state, basically showing you which page you are currently on. Take a look at my top navigation, you should see that the &#8220;Blog&#8221; link is in its active state. This technique is what you will be learning today.
Take a look [...]]]></description>
			<content:encoded><![CDATA[<p>I am sure you have been on a website where the navigation has an &#8220;active&#8221; state, basically <span id="more-2363"></span>showing you which page you are currently on. Take a look at my top navigation, you should see that the &#8220;Blog&#8221; link is in its active state. This technique is what you will be learning today.</p>
<p>Take a look at the demo below to get a preview of what you will be creating. Also if you would like to download the PSD that we will be working with, go right ahead.</p>
<p><a href="http://www.sohtanaka.com/web-design/examples/active-navigation/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/active-navigation/demo.gif" alt="Active Navigation with CSS" /></a></p>
<div class="highlight">
<p><a class="view" href="http://www.sohtanaka.com/web-design/examples/active-navigation/" target="_blank">View Demo</a> | <a class="download" href="http://www.sohtanaka.com/web-design/examples/active-navigation/ActiveNav_bySohTanaka.psd" target="_blank">Download Navigation PSD</a></div>
<h4>Foundation &#8211; HTML</h4>
<p>Start by creating your navigation with an unordered list. Be sure to assign a unique class name to each of the list items.</p>
<pre>&lt;ul id="topnav"&gt;
	&lt;li class="home"&gt;&lt;a href="index.htm"&gt;Home&lt;/a&gt;&lt;/li&gt;
	&lt;li class="about"&gt;&lt;a href="about.htm"&gt;About Us&lt;/a&gt;&lt;/li&gt;
	&lt;li class="services"&gt;&lt;a href="services.htm"&gt;Services&lt;/a&gt;&lt;/li&gt;
	&lt;li class="portfolio"&gt;&lt;a href="portfolio.htm"&gt;Portfolio&lt;/a&gt;&lt;/li&gt;
	&lt;li class="contact"&gt;&lt;a href="contact.htm"&gt;Contact&lt;/a&gt;&lt;/li&gt;
	&lt;li class="blog"&gt;&lt;a href="blog.htm"&gt;Blog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<h4>Styling &#8211; CSS</h4>
<p>Strip down the unordered list to bare bones. This will prepare us for the text replacement technique for each of our navigation links.</p>
<pre>ul#topnav {
	margin: 0; padding: 0;
	list-style: none;
	float: left;
	width: 960px;
}
ul#topnav li {
	float: left;
	margin: 0; padding: 0;
}</pre>
<p>We will be using <a href="http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/" target="_blank">CSS Sprites</a>, this will basically allow us to have three states (Default, Hover, &amp; Active) for each navigation link.</p>
<p><img class="center" src="http://www.sohtanaka.com/web-design/examples/active-navigation/demo_view.gif" alt="Active Navigation with CSS" /></p>
<pre><span style="color: #999;">/*--CSS Sprites - Default State--*/</span>
ul#topnav a {
	float: left;
	display: block;
	height: 58px; <span style="color: #999;">/*--Specify height of navigation--*/</span>
	text-indent: -99999px; <span style="color: #999;">/*--Shoot the text off the page--*/</span>
	background-position: left top;
}
<span style="color: #999;">/*--CSS Sprites - Hover State--*/</span>
ul#topnav a:hover {
	background-position: left -58px;
}
<span style="color: #999;">/*--Assign an image and width to each link--*/</span>
ul#topnav li.home a {
	background-image: url(home_a.jpg);
	width: 120px;
}
ul#topnav li.about a {
	background-image: url(about_a.jpg);
	width: 147px;
}
ul#topnav li.services a {
	background-image: url(services_a.jpg);
	width: 157px;
}
ul#topnav li.portfolio a {
	background-image: url(portfolio_a.jpg);
	width: 182px;
}
ul#topnav li.contact a {
	background-image: url(contact_a.jpg);
	width: 179px;
}
ul#topnav li.blog a {
	background-image: url(blog_a.jpg);
	width: 175px;
}</pre>
<h4>Setting the &#8220;Active&#8221; State</h4>
<p>We will be adding this &#8220;active&#8221; state by assigning an ID to the &lt;body&gt; tag on each of our pages. By assigning an ID to each page, we can now specify different properties and values depending on which page it&#8217;s on.</p>
<p>So for example, the homepage file should have the &lt;body&gt; tag set like this:</p>
<p><strong>Home Page HTML</strong></p>
<pre>...
&lt;body id="home"&gt;
...</pre>
<p>and the About Us page like:</p>
<p><strong>About Page HTML</strong></p>
<pre>...
&lt;body id="about"&gt;
...</pre>
<p>and so on. Each page should now have its own unique ID on the &lt;body&gt; tag.</p>
<p>Using <a href="http://www.smashingmagazine.com/2007/07/27/css-specificity-things-you-should-know/" target="_blank">CSS Specificity</a> to override the default and hover states, we associate each body ID with its matching list item class to set the active state.</p>
<p><strong>The Logic in Plain English</strong><br />
If it&#8217;s on the &#8220;home&#8221; page <small>(body id=&#8221;home&#8221;)</small> , set the &#8220;home&#8221; link <small>(li class=&#8221;home&#8221;)</small> to &#8220;active&#8221; <small>(background-position: left bottom;)</small>.</p>
<p>Now we will apply this logic to cater for all of the pages.</p>
<p><strong>CSS</strong></p>
<pre>#home li.home a, <span style="color: #999;">/*--Home Page &gt; Home Link--*/</span>
#about li.about a, <span style="color: #999;">/*--About Page &gt; About Link--*/</span>
#services li.services a, <span style="color: #999;">/*--Services Page &gt; Services Link--*/</span>
#portfolio li.portfolio a, <span style="color: #999;">/*--Portfolio Page &gt; Portfolio Link--*/</span>
#contact li.contact a, <span style="color: #999;">/*--Contact Page &gt; Contact Link--*/</span>
#blog li.blog a <span style="color: #999;">/*--Blog Page &gt; Blog Link--*/</span>
{
	background-position: left bottom;
}</pre>
<p>Below is a visual demonstration of how all of this is working together.</p>
<p><img class="center" src="http://www.sohtanaka.com/web-design/examples/active-navigation/demo_active.gif" alt="Active Navigation with CSS" /></p>
<h4>Conclusion</h4>
<p>If anyone has any questions, concerns, or comments please feel free to let me know!</p>
<h4>Need Navigation Inspiration?</h4>
<p>Check out <a href="http://www.designbombs.com/tag/navigation/" target="_blank">Design Bombs</a> for some <a href="http://www.designbombs.com/tag/navigation/" target="_blank">navigation inspiration</a>!</p>
<p><a href="http://www.designbombs.com/tag/navigation/" target="_blank"><img class="center" src="http://www.sohtanaka.com/web-design/examples/active-navigation/designbombs.jpg" alt="CSS Navigation Inspiration" /></a></p>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://www.sohtanaka.com/web-design/animate-navigation-with-css-jquery/" rel="bookmark" title="July 28, 2009">Animated Navigation with CSS &#038; jQuery</a></li>
<li><a href="http://www.sohtanaka.com/web-design/horizontal-sub-nav-with-css-jquery/" rel="bookmark" title="July 13, 2009">Horizontal Subnav with CSS</a></li>
<li><a href="http://www.sohtanaka.com/web-design/mega-drop-downs-w-css-jquery/" rel="bookmark" title="November 3, 2009">Mega Drop Down Menus w/ CSS &#038; jQuery</a></li>
<li><a href="http://www.sohtanaka.com/web-design/css-beginners-do%e2%80%99s-and-dont%e2%80%99s-part-2/" rel="bookmark" title="June 8, 2009">CSS Beginners Do’s and Dont’s Part 2</a></li>
<li><a href="http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-1/" rel="bookmark" title="November 29, 2009">Facebook Style Footer Admin Panel Part 1</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sohtanaka.com/web-design/active-state-in-css-navigations/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>Sticky SideNav Layout with CSS</title>
		<link>http://www.sohtanaka.com/web-design/sticky-sidenav-layout-with-css/</link>
		<comments>http://www.sohtanaka.com/web-design/sticky-sidenav-layout-with-css/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 22:03:31 +0000</pubDate>
		<dc:creator>Soh</dc:creator>
				<category><![CDATA[CSS/XHTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[guest post]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[navigation]]></category>

		<guid isPermaLink="false">http://www.sohtanaka.com/?p=2341</guid>
		<description><![CDATA[I recently wrote an article for DesignM.ag on how to create a fixed navigation layout with CSS. You can check out the article here!
Today I would like to go over how to create a fixed sidenav layout for your blog or website.
Having a fixed sidenav comes in handy when dealing with blog style websites where [...]]]></description>
			<content:encoded><![CDATA[<p>I recently wrote an article for DesignM.ag on how to create a fixed navigation <span id="more-2341"></span>layout with CSS. You can <a href="http://designm.ag/tutorials/sticky-sidenav-layout/" target="_blank">check out the article here</a>!</p>
<blockquote><p>Today I would like to go over how to create a fixed sidenav layout for your blog or website.</p>
<p>Having a fixed sidenav comes in handy when dealing with blog style websites where the content is extremely tall and there is a need for good amount of scrolling. The fixed navigation allows the user to cruise through the content without scrolling back up to the top to navigate through the rest of the site&#8230;<a href="http://designm.ag/tutorials/sticky-sidenav-layout/" target="_blank">Read More</a></p>
</blockquote>
<p><a href="http://designm.ag/tutorials/sticky-sidenav-layout/" target="_blank"><img src="http://www.sohtanaka.com/web-design/examples/sticky-nav/blog_preview.gif" alt="Fixed Navigation with CSS" class="center" /></a></p>
<div class="highlight">
<p><a href="http://designm.ag/tutorials/sticky-sidenav-layout/" target="_blank" class="view">View Article</a></p>
</div>
<p><strong>Similar Posts:</strong>
<ul class="similar-posts">
<li><a href="http://www.sohtanaka.com/web-design/css-vertical-navigation-with-teaser/" rel="bookmark" title="December 15, 2008">CSS Vertical Navigation with Teaser</a></li>
<li><a href="http://www.sohtanaka.com/web-design/markup-hierarchy-advantages-seo/" rel="bookmark" title="April 5, 2009">Markup Hierarchy &#8211; Advantages in SEO</a></li>
<li><a href="http://www.sohtanaka.com/web-design/css-beginners-do%e2%80%99s-and-dont%e2%80%99s-part-2/" rel="bookmark" title="June 8, 2009">CSS Beginners Do’s and Dont’s Part 2</a></li>
<li><a href="http://www.sohtanaka.com/web-design/side-navigation-tooltip-popup-bubble/" rel="bookmark" title="March 10, 2009">Side Navigation Tooltip / Popup Bubble</a></li>
<li><a href="http://www.sohtanaka.com/web-design/print-css-javascript-icons/" rel="bookmark" title="October 31, 2008">Using Print Stylesheets Effectively</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sohtanaka.com/web-design/sticky-sidenav-layout-with-css/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
