<?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>MySandbox &#187; Tips and Trick</title>
	<atom:link href="http://sandbox.ronggur.com/category/categories/tips-and-trick/feed/" rel="self" type="application/rss+xml" />
	<link>http://sandbox.ronggur.com</link>
	<description>Ronggur Hutasuhut Playground</description>
	<lastBuildDate>Mon, 31 Oct 2011 10:39:36 +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>3 Ways to Create Round Corner Menu</title>
		<link>http://sandbox.ronggur.com/2009/09/11/3-ways-to-creat-round-corner-menu/</link>
		<comments>http://sandbox.ronggur.com/2009/09/11/3-ways-to-creat-round-corner-menu/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 06:34:11 +0000</pubDate>
		<dc:creator>ronggur</dc:creator>
				<category><![CDATA[Tips and Trick]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[featured]]></category>

		<guid isPermaLink="false">http://sandbox.ronggur.com/?p=153</guid>
		<description><![CDATA[There are 3 ways (as far as i knows) to create round corner menu, by image and css, css property and javascript. And in this post we&#8217;ll try to create in that 3 different ways. Actually this is some old (&#8230;)</p><p><a href="http://sandbox.ronggur.com/2009/09/11/3-ways-to-creat-round-corner-menu/">Read the rest of this entry &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>There are 3 ways (as far as i knows) to create round corner menu, by image and css, css property and javascript. And in this post we&#8217;ll try to create in that 3 different ways. Actually this is some old issue but maybe one of you will need it someday <img src='http://sandbox.ronggur.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . So let&#8217;s start it</p>
<h4>1. CSS Property</h4>
<p>By adding <em>&#8216;</em><span><em>-moz-border-radius&#8217;</em> for FF or <em>&#8216;</em></span><em>-webkit-border-radius&#8217;</em> for Safari, ucan create round corner element. Comparing to other maybe this one is the lightest and easiest way to create round corner element. Here is some example how to use it</p>
<p><strong>applying bottom left</strong></p>
<pre class="brush: css; title: ; notranslate">

-moz-border-radius-bottomleft:7px;
</pre>
<p><strong>applying bottom right</strong></p>
<pre class="brush: css; title: ; notranslate">

-moz-border-radius-bottomright:7px;
</pre>
<p><strong>applying top left</strong></p>
<pre class="brush: css; title: ; notranslate">

-moz-border-radius-topleft:7px;
</pre>
<p><strong>applying top right<br />
</strong></p>
<pre class="brush: css; title: ; notranslate">

-moz-border-radius-topright:7px
</pre>
<p><strong>applying all corner<br />
</strong></p>
<pre class="brush: css; title: ; notranslate">

-moz-border-radius:7px;
</pre>
<p>So far i only know that this technique only works for Firefox and Safari. Remember that <span style="text-decoration: underline;">&#8216;-moz-border-radius&#8217; is works for Firefox and <span><em>&#8216;</em></span><em>-webkit-border-radius&#8217;</em> for safari</span></p>
<p><a title="round corner menu using css property" href="http://dock.ronggur.com/tutorial/roundcorner_menu/css.html" target="_self" onclick="pageTracker._trackPageview('/outgoing/dock.ronggur.com/tutorial/roundcorner_menu/css.html?referer=');"><strong>view demo (all corner)</strong></a></p>
<h4>2. Javascript</h4>
<p>By using some javascript function or plugin we can create round corner element. So far if i need it i use <a title="jquery corner" href="http://malsup.com/jquery/corner/" onclick="pageTracker._trackPageview('/outgoing/malsup.com/jquery/corner/?referer=');">jquery corner</a> you can download this plugin here <a title="jquery corner" href="http://malsup.com/jquery/corner/jquery.corner.js?v1.99" onclick="pageTracker._trackPageview('/outgoing/malsup.com/jquery/corner/jquery.corner.js?v1.99&amp;referer=');">http://malsup.com/jquery/corner/jquery.corner.js?v1.99</a>. The best thing using this plugin, you can create diffent shape for corner, not only round. And it have good browser compatibility.</p>
<p>Here is basic sample how to use it.</p>
<pre class="brush: jscript; title: ; notranslate">

jQuery(document).ready(function(){

$(&quot;#nav li&quot;).corner(&quot;7px&quot;);
});
</pre>
<p><strong><a title="round corner menu using javascript" href="http://dock.ronggur.com/tutorial/roundcorner_menu/js.html" target="_self" onclick="pageTracker._trackPageview('/outgoing/dock.ronggur.com/tutorial/roundcorner_menu/js.html?referer=');"><strong>view demo</strong></a> </strong>. For complete example, please visit the official site.</p>
<h4>3. Image and CSS</h4>
<p>In this part we use images as background to create the menu. We slice rounded images into 2 parts. First is for the left side and the other is for the righ side (see picture)</p>
<p>One of the image will wider than the other, in this example we create the left side wider than the right one.</p>
<div id="attachment_156" class="wp-caption aligncenter" style="width: 290px"><a href="http://sandbox.ronggur.com/wp-content/uploads/2009/09/menu.jpg"><img class="size-full wp-image-156" title="menu" src="http://sandbox.ronggur.com/wp-content/uploads/2009/09/menu.jpg" alt="Images slice for menu" width="280" height="215" /></a><p class="wp-caption-text">Images slice for menu</p></div>
<p>As you see at image above, we will put the wider background in &lt;li&gt; and make the left side menu looks round. Then we put the right side in &lt;a&gt;. Don&#8217;t forget to make &lt;li&gt; and &lt;a&gt; have the same height so the round corner will look perfect (use padding to adjust it). Here is the the css code</p>
<pre class="brush: css; title: ; notranslate">
ul,ol{
padding: 10px 10px;
margin-left:10px;
}
ul li {
list-style: decimal inside;
list-style:none !important;
}

#nav {
margin:0;
padding0;
overflow:hidden;
float:left;
position:relative;
}
#nav li{
float:left;
margin:0;
text-align:center;
height:32px;
margin-right:10px;
background:transparent url('images/menuleft_bg.jpg') left bottom no-repeat;
}

#nav li a{
margin:0;
height:16px;
display:block;
vertical-align:middle;
padding:8px 10px;
background:transparent url('images/menuright_bg.jpg') right bottom no-repeat;
}
</pre>
<p><strong><strong><a title="round corner menu using javascript" href="http://dock.ronggur.com/tutorial/roundcorner_menu/image.html" target="_self" onclick="pageTracker._trackPageview('/outgoing/dock.ronggur.com/tutorial/roundcorner_menu/image.html?referer=');"><strong>view demo</strong></a></strong></strong></p>
<p>Thats it, thanks for visiting my sandbox <img src='http://sandbox.ronggur.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p class="buymebeer"><form action="https://www.paypal.com/cgi-bin/webscr" target="paypal" method="post"><input type="hidden" name="cmd" value="_xclick" /><input type="hidden" name="business" value="ronggur.mh@gmail.com" /><input type="hidden" name="return" value="Thank you for your kindness :D" /><input type="hidden" name="item_name" value="Buy Me a Beer for 3 Ways to Create Round Corner Menu" /><input type="hidden" name="currency_code" value="USD" /><input type="hidden" name="amount" value="" /><input type="image" src="http://sandbox.ronggur.com/wp-content/plugins/buy-me-beer/icon_cafe.gif" align="left" alt="coffee" title="coffee" hspace="3" /></form><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=ronggur.mh@gmail.com&amp;currency_code=USD&amp;amount=&amp;return=Thank you for your kindness :D&amp;item_name=Buy+Me+a+Beer+for+3+Ways+to+Create+Round+Corner+Menu" target="paypal" onclick="pageTracker._trackPageview('/outgoing/www.paypal.com/cgi-bin/webscr?cmd=_xclick_amp_business=ronggur.mh_gmail.com_amp_currency_code=USD_amp_amount=_amp_return=Thank_you_for_your_kindness_D_amp_item_name=Buy+Me+a+Beer+for+3+Ways+to+Create+Round+Corner+Menu&amp;referer=');">You can give me some coffee if you want to :D</a></p>]]></content:encoded>
			<wfw:commentRss>http://sandbox.ronggur.com/2009/09/11/3-ways-to-creat-round-corner-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: sandbox.ronggur.com @ 2012-02-04 22:56:51 -->
