<?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>Richard Knop&#039;s Zend Framework Blog &#187; Rounded corners</title>
	<atom:link href="http://blog.richardknop.com/tag/rounded-corners/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.richardknop.com</link>
	<description>Zend Framework, PHP, MySQL, jQuery, JavaScript, AJAX, SEO, E-commerce and more</description>
	<lastBuildDate>Mon, 06 Sep 2010 15:49:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Rounded corners menu</title>
		<link>http://blog.richardknop.com/2009/05/rounded-corners-menu/</link>
		<comments>http://blog.richardknop.com/2009/05/rounded-corners-menu/#comments</comments>
		<pubDate>Fri, 29 May 2009 14:35:55 +0000</pubDate>
		<dc:creator>Richard Knop</dc:creator>
				<category><![CDATA[Web design]]></category>
		<category><![CDATA[Rounded corners]]></category>

		<guid isPermaLink="false">http://blog.richardknop.com/?p=228</guid>
		<description><![CDATA[Rounded corners menu is very popular in modern designs and it&#8217;s handy to know how to achieve it with a simple CSS applied on a semantic XHTML markup. First, here is the markup: &#60;ul class="rounded"&#62; &#60;li&#62;&#60;a href="#"&#62;&#60;span&#62;Home&#60;/span&#62;&#60;/a&#62;&#60;/li&#62; &#60;li&#62;&#60;a href="#"&#62;&#60;span&#62;About&#60;/span&#62;&#60;/a&#62;&#60;/li&#62; &#60;li&#62;&#60;a href="#"&#62;&#60;span&#62;Services&#60;/span&#62;&#60;/a&#62;&#60;/li&#62; &#60;li&#62;&#60;a href="#"&#62;&#60;span&#62;Portfolio&#60;/span&#62;&#60;/a&#62;&#60;/li&#62; &#60;li&#62;&#60;a href="#"&#62;&#60;span&#62;Contact&#60;/span&#62;&#60;/a&#62;&#60;/li&#62; &#60;li&#62;&#60;a href="#"&#62;&#60;span&#62;Blog&#60;/span&#62;&#60;/a&#62;&#60;/li&#62; &#60;/ul&#62; Quite simple. The only thing that&#8217;s not [...]]]></description>
			<content:encoded><![CDATA[<p>Rounded corners menu is very popular in modern designs and it&#8217;s handy to know how to achieve it with a simple CSS applied on  a semantic XHTML markup. First, here is the markup:</p>
<pre>&lt;ul class="rounded"&gt;
    &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt;Home&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt;About&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt;Services&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt;Portfolio&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt;Contact&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="#"&gt;&lt;span&gt;Blog&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</pre>
<p>Quite simple. The only thing that&#8217;s not right there are span tags &#8211; those are there because it&#8217;s the easiest way to add a hover effect (such as color change) to the rounded menu links.</p>
<p>Here are images I used:</p>
<p><img class="alignnone" title="Left rounded image" src="http://test.richardknop.com/rounded-corners-menu/rounded-left.gif" alt="" width="396" height="43" /></p>
<p><img class="alignnone" title="Right rounded image" src="http://test.richardknop.com/rounded-corners-menu/rounded-right.gif" alt="" width="11" height="43" /></p>
<p>The CSS I used:</p>
<pre>.rounded li {
    display: inline;
}
.rounded a {
    float: left;
    height: 43px;
    margin-right: 1em;
    background: url('rounded-left.gif') left top no-repeat;
    color: white;
    line-height: 43px;
}
.rounded span {
    float: left;
    height: 43px;
    padding: 0 1em;
    background: url('rounded-right.gif') right top no-repeat;
}</pre>
<p>To add the hover effect I used another two images (different only in color):</p>
<p><img class="alignnone" title="Left rounded image hovered" src="http://test.richardknop.com/rounded-corners-menu/rounded-left-hovered.gif" alt="" width="396" height="43" /></p>
<p><img class="alignnone" title="Right rounded image hovered" src="http://test.richardknop.com/rounded-corners-menu/rounded-right-hovered.gif" alt="" width="11" height="43" /></p>
<p>And two additional styles:</p>
<pre>.rounded a:hover {
    background: url('rounded-left-hovered.gif') left top no-repeat;
}
.rounded a:hover span {
    background: url('rounded-right-hovered.gif') right top no-repeat;
}</pre>
<p>Here is the <a href="http://test.richardknop.com/rounded-corners-menu/">demo</a>. Tested in following browsers:</p>
<ul>
<li>IE6, IE7</li>
<li>Firefox</li>
<li>Opera 9.64</li>
<li>Chrome 1.0.154.65</li>
</ul>
<p>You will need to clear the floats after the menu though. I usually do it by adding an additional class to the next element:</p>
<pre>.clear {
    clear: both;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.richardknop.com/2009/05/rounded-corners-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
