<?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>Codrops &#187; toolbar</title>
	<atom:link href="http://tympanus.net/codrops/tag/toolbar/feed/" rel="self" type="application/rss+xml" />
	<link>http://tympanus.net/codrops</link>
	<description>Useful resources and inspiration for creative minds</description>
	<lastBuildDate>Mon, 06 Feb 2012 07:30:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Collective: Nice And Simple Toolbar For Your Website With CSS3 And jQuery</title>
		<link>http://tympanus.net/codrops/2010/05/04/collective-nice-and-simple-toolbar-for-your-website-with-css3-and-jquery/</link>
		<comments>http://tympanus.net/codrops/2010/05/04/collective-nice-and-simple-toolbar-for-your-website-with-css3-and-jquery/#comments</comments>
		<pubDate>Tue, 04 May 2010 10:44:57 +0000</pubDate>
		<dc:creator>Community</dc:creator>
				<category><![CDATA[Collective]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[toolbar]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=2036</guid>
		<description><![CDATA[During these months I’ve learned an important lesson as blogger. If you want to start an activity on the web with a blog, magazine or a general website, you must plan a clever action on the Social Networking and Bookmarking websites. Often it’s an hard thing to interface a website with the many available social [...]]]></description>
			<content:encoded><![CDATA[<p><!-- Digg Digg Disabled --></p>
<p><a href="http://www.pvmgarage.com/en/2009/12/nice-and-simple-toolbar-for-your-website-with-css3-and-jquery/"><img src="http://tympanus.net/codrops/wp-content/uploads/2010/05/toolbar.jpg" alt="" title="toolbar" width="580" height="300" class="aligncenter size-full wp-image-2037" /></a></p>
<p>During these months I’ve learned an important lesson as blogger. If you want to start an activity on the web with a blog, magazine or a general website, you must plan a clever action on the Social Networking and Bookmarking websites.<br />
Often it’s an hard thing to interface a website with the many available social services, but recently there are some famous blogs, like Abduzeedo and Mashable, that are using a fixed toolbar on the bottom of the page with useful button for the sharing.<br />
There are services, like Wibiya, that allow to add a toolbar in a few steps, but why don’t you create a really custom panel using your CSS and jQuery skills?<br />
In this tutorial we’ll learn how to build a nice toolbar for our website using some CSS3 properties and basic jQuery techniques.</p>
<h3>Source</h3>
<p><a href="http://www.pvmgarage.com/en/2009/12/nice-and-simple-toolbar-for-your-website-with-css3-and-jquery/" target="_blank">http://www.pvmgarage.com/en/2009/12/nice-and-simple-toolbar-for-your-website-with-css3-and-jquery/</a></p>
<h3>Demo</h3>
<p><a href="http://www.pvmgarage.com/downloads/newsaggregator_toolbar/" target="_blank">http://www.pvmgarage.com/downloads/newsaggregator_toolbar/</a></p>
<div style="margin-bottom:100px;"></div>
<p><!-- wp_ad_camp_1 --></p>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2010/05/04/collective-nice-and-simple-toolbar-for-your-website-with-css3-and-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Tutorial: Image with Toolbar and Navigation Overlay</title>
		<link>http://tympanus.net/codrops/2009/11/23/css-tutorial-image-with-toolbar-navigation-overlay/</link>
		<comments>http://tympanus.net/codrops/2009/11/23/css-tutorial-image-with-toolbar-navigation-overlay/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 08:21:55 +0000</pubDate>
		<dc:creator>Mary Lou</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[overlay]]></category>
		<category><![CDATA[toolbar]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://tympanus.net/codrops/?p=822</guid>
		<description><![CDATA[In this tutorial I will show you how to create an overlay toolbar and navigation for an image. This type of technique can, for example, be applied in an image gallery where you want to provide some options for the user when he is viewing your images. The result of this tutorial will look like [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial I will show you how to create an overlay toolbar and navigation for an image. This type of technique can, for example, be applied in an image gallery where you want to provide some options for the user when he is viewing your images.</p>
<p>The result of this tutorial will look like this:</p>
<p><img class="alignnone size-full wp-image-823" title="csstut_img" src="http://tympanus.net/codrops/wp-content/uploads/2009/11/csstut_img.gif" alt="csstut_img" width="550" height="424" /></p>
<p>As you can see, we will create a toolbar with icons and a navigation bar. In the end we will use some JavaScript (jQuery) in order to make the bars appear and disappear again.</p>
<p>The icons we will be using for this tutorial belong to the incredible <a href="http://min.frexy.com/article/milky_a_free_vector_icon_set_part_1/" target="_blank">Milky</a> icon set. Please visit the site to get the complete icon set by Frexy.</p>
<p><span id="more-822"></span></p>
<div id="bsap_1266918" class="bsarocks bsap_af25dfd2f1908889af7a1aa5f4dcbd9e"></div><div style="clear:both;"></div>
<h3>1. The HTML Structure</h3>
<p>Let&#8217;s start by the HTML structure. We will need three main elements inside of a wrapper or container:</p>
<ol>
<li>upper toolbar with 8 tool icons</li>
<li>navigation with previous and next icon, and a price tag</li>
<li>the image itself</li>
</ol>
<p>The upper toolbar will be an unordered list:</p>
<pre class="blue">&lt;ul class="toolbar"&gt;
 &lt;li&gt;&lt;a class="zoomin"&gt;&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a class="zoomout"&gt;&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a class="shop"&gt;&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a class="fav"&gt;&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a class="edit"&gt;&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a class="label"&gt;&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a class="info"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>The navigation bar will be a simple div looking like this:</p>
<pre class="blue">&lt;div class="navigation"&gt;
 &lt;a class="previous"&gt;&lt;/a&gt;
 &lt;a class="next"&gt;&lt;/a&gt;
 &lt;span class="price"&gt;$ 0.99&lt;/span&gt;
&lt;/div&gt;</pre>
<p>Put into a wrapper or container and adding the image we will have a structure like this:</p>
<pre class="blue">&lt;div class="image_container"&gt;
 &lt;ul class="toolbar"&gt;
  &lt;li&gt;&lt;a class="zoomin"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="zoomout"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="shop"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="fav"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="edit"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="label"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="info"&gt;&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;img src="example.jpg" alt="example" width="500" height="375"/&gt;
 &lt;div class="navigation"&gt;
  &lt;a class="previous"&gt;&lt;/a&gt;
  &lt;a class="next"&gt;&lt;/a&gt;
  &lt;span class="price"&gt;$ 0.99&lt;/span&gt;
 &lt;/div&gt;
&lt;/div&gt;</pre>
<h3>2. The CSS</h3>
<p>Now we will add some style to the classes of the HTML elements. The image container shall look like a frame with a neat shadow around. This we can reach with the CSS3 box shadow property that will not work in Internet Explorer, but which will give a nice effect in e.g. Firefox and Chrome. The styling for the container will be the following:</p>
<pre class="yellow">.image_container{
 width:500px;
 height:375px;
 padding:5px;
 background-color:#f7f7f7;
 border:1px solid #ccc;
 -moz-box-shadow: 0 1px 3px #777;
 -webkit-box-shadow: 0 1px 3px #777;
 margin:40px auto;
}</pre>
<p>The image that we are going to use will be 500 pixel wide and 375 pixel high, so we will make the container around it the same size. For the border effect we will not simply add a border, but a background color and some padding. You see, this allows you to add two borders to an image: one is created by the padding and the other by the border.</p>
<p>With setting the left and right margin to auto, we center the div vertically on the page. <strong>Remember the order for the short CSS version: TOP RIGHT BOTTOM LEFT. If you just have two values it is: TOP+BOTTOM RIGHT+LEFT.</strong></p>
<p>Let&#8217;s continue by styling the unordered list for the icons.</p>
<p>Because we want it to appear on top of the image, we need to make the position of the unordered list absolute:</p>
<pre class="yellow">ul.toolbar{
 position:absolute;
 width:500px;
 height:52px;
 margin:0px;
 padding:0px;
 background-color:#fff;
 border-bottom:2px solid #ccc;
 list-style-type:none;
}</pre>
<p>When styling lists, it is always important to keep in mind that they have a <strong>default margin and padding</strong>. In this example, we don&#8217;t want it to have any of these, so we set them to zero. The <strong>list-style-type</strong> should be none, since we don&#8217;t want any little bullet next to our list items.</p>
<p>Now, we want to make the list being in a line. That we need to define in the list elements:</p>
<pre class="yellow">ul.toolbar li{
 display:inline;
}</pre>
<p>When coding CSS, we always want to try to write compact classes and not repeat everything for similar elements. All the <strong>a</strong> elements in our list will have a different icon, so we need to create different classes for them. But, they will also have many properties in common. So, the first step we take, is to define these common properties for the general case:</p>
<pre class="yellow">ul.toolbar li a{
 float:left;
 cursor:pointer;
 width:70px;
 height:52px;
 opacity: 0.6;
}</pre>
<p>The icon itself is 48 pixels wide and high, but we want to give the buttons that we create out of the icons a little bit more space. When styling link elements, one should always keep in mind that they only change the mouse cursor to a little hand, when there is a <strong>href </strong>in them. In our case we will not have a link address, so we set the <strong>cursor property to pointer</strong>. The icons should be a little bit transparent, so we set the <strong>opacity to 0.6</strong>. We want them to become opaque when we hover over them, so we define:</p>
<pre class="yellow">ul.toolbar li a:hover{
 opacity: 1.0;
}</pre>
<p>Now we can define the classes for the icons:</p>
<pre class="yellow">a.label{
 background:#fff url(icons/label.png) no-repeat center center;
}
a.fav{
 background:#fff url(icons/favorite.png) no-repeat center center;
}
a.shop{
 background:#fff url(icons/shopping_cart.png) no-repeat center center;
}
a.zoomin{
 background:#fff url(icons/zoom_in.png) no-repeat center center;
}
a.zoomout{
 background:#fff url(icons/zoom_out.png) no-repeat center center;
}
a.fullscreen{
 background:#fff url(icons/fullscreen.png) no-repeat center center;
}
a.info{
 background:#fff url(icons/info.png) no-repeat center center;
}
a.edit{
 background:#fff url(icons/edit.png) no-repeat center center;
}</pre>
<p>With this styling we are done with the upper toolbar.<br />
The navigation div will have a similar style to the unordered list:</p>
<pre class="yellow">.navigation{
 width:500px;
 height:52px;
 position:absolute;
 margin-top:-58px;
 border-top:2px solid #ccc;
 background-color:#fff;
}</pre>
<p>The <strong>margin-top</strong> gets a negative value because we want to pull the navigation bar up to appear on top of the image. (When making the container relative, we could as well just say e.g. left:0px and bottom:0px.)<br />
The two arrows for the navigation will have the following styling:</p>
<pre class="yellow">a.previous{
 float:left;
 background:#fff url(icons/prev.png) no-repeat center center;
}
a.next{
 float:right;
 background:#fff url(icons/next.png) no-repeat center center;
}</pre>
<p>Since these elements will as well have the same styling like the <strong>a</strong> elements in the upper toolbar, we will just add the class to the already existing css:</p>
<pre class="yellow">ul.toolbar li a<span style="color:red;">, .navigation a</span>{
 float:left;
 cursor:pointer;
 width:70px;
 height:52px;
 opacity: 0.6;
}</pre>
<p>Last but not least, we have the price tag, which has the following styling:</p>
<pre class="yellow">span.price{
 position:absolute;
 color:#888;
 font-weight:bold;
 font-size:26px;
 margin:10px 0px 0px 140px;
}</pre>
<p>The margin of the absolute positioned element allows to position it relative to the containing element. Using e.g. top or left would position an absolute element relative to the page itself.<br />
So, now we are done with the markup and styling and ready to add some magic.</p>
<h3>3. The JavaScript</h3>
<p>We want the toolbar and navigation to appear only when we hover over the image. Further, we want that, when passing over one of the bars, they become opaque.<br />
To achieve these effects we will simply use jQuery. First, we will need to add style for another class to the CSS which will make elements transparent:</p>
<pre class="yellow">.transparent{
 opacity: 0.6;
}</pre>
<p>We will add this class to the toolbar and the navigation. Additionally, we will add a style tag saying that the elements should be invisible:</p>
<pre class="blue">&lt;div class="image_container"&gt;
 &lt;ul class="toolbar <span style="color:red;">transparent" style="display:none;"</span>&gt;
  &lt;li&gt;&lt;a class="zoomin"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="zoomout"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="shop"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="fav"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="edit"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="label"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="info"&gt;&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;img src="example.jpg" alt="example" width="500" height="375"/&gt;
 &lt;div class="navigation <span style="color:red;">transparent" style="display:none;"</span>&gt;
  &lt;a class="previous"&gt;&lt;/a&gt;
  &lt;a class="next"&gt;&lt;/a&gt;
  &lt;span class="price"&gt;$ 0.99&lt;/span&gt;
 &lt;/div&gt;
&lt;/div&gt;</pre>
<p>Since we will use some JavaScript functions acting on the elements, we need to identify them with unique ids:</p>
<pre class="blue">&lt;div class="image_container" <span style="color:red;">id="img_cont"</span>&gt;
 &lt;ul class="toolbar transparent" <span style="color:red;">id="tlbar"</span> style="display:none;"&gt;
  &lt;li&gt;&lt;a class="zoomin"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="zoomout"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="shop"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="fav"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="edit"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="label"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class="info"&gt;&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;img src="example.jpg" alt="example" width="500" height="375"/&gt;
 &lt;div class="navigation transparent" <span style="color:red;">id="nav"</span> style="display:none;"&gt;
  &lt;a class="previous"&gt;&lt;/a&gt;
  &lt;a class="next"&gt;&lt;/a&gt;
  &lt;span class="price"&gt;$ 0.99&lt;/span&gt;
 &lt;/div&gt;
&lt;/div&gt;</pre>
<p>In the head of the document, we need to add a link to the jQuery script:</p>
<pre>&lt;script type="text/javascript" src="jquery-1.3.2.js"&gt;&lt;/script&gt;</pre>
<p>Now we can define some functions before the closing body tag:</p>
<pre class="green">&lt;script&gt;
$(function() {
 $('#img_cont').hover(
   function () {
    $('#tlbar').slideDown(200);
    $('#nav').slideDown(200);
   },
   function () {
    $('#tlbar').slideUp(200);
    $('#nav').slideUp(200);
   }
 );
 $('#tlbar,#nav').hover(
  function () {
   $(this).removeClass('transparent');
  },
  function () {
   $(this).addClass('transparent');
  }
 );
});
&lt;/script&gt;</pre>
<p>We define that we want the toolbar and the navigation bar to appear &#8220;sliding down&#8221; very quickly (200 milliseconds) whenever we hover over the the image container. Then, when hovering over one of the elements, we want them to become opaque. That we achieve by removing the transparent class.<br />
And that&#8217;s  it!<br />
<a class="demo" href="http://tympanus.net/codrops/wp-content/uploads/2009/11/tutorial2211/" target="_blank">View demo</a><a class="download" href="http://tympanus.net/codrops/wp-content/uploads/2009/11/tutorial2211/tutorial2211.zip" target="_blank">Download source</a></p>
<p><!-- wp_ad_camp_1 --></p>
]]></content:encoded>
			<wfw:commentRss>http://tympanus.net/codrops/2009/11/23/css-tutorial-image-with-toolbar-navigation-overlay/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  tympanus.net/codrops/tag/toolbar/feed/ ) in 0.23786 seconds, on Feb 7th, 2012 at 12:34 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 7th, 2012 at 1:34 pm UTC -->
