<?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>infinita Design</title>
	<atom:link href="http://infinitadesign.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://infinitadesign.com/blog</link>
	<description>coding style.</description>
	<lastBuildDate>Sat, 20 Mar 2010 01:10:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Simple JQuery Accordion menu</title>
		<link>http://infinitadesign.com/blog/2010/01/02/simple-jquery-accordion-menu/</link>
		<comments>http://infinitadesign.com/blog/2010/01/02/simple-jquery-accordion-menu/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 21:02:16 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/blog/?p=114</guid>
		<description><![CDATA[O JQuery torna este tipo de efeito muito fácil de ser implementado. Veremos aqui como é simples.
Primeiro é necessário uma lista com sublistas internas que funcionarão como nosso menu e submenus respectivamente.
Abaixo o codigo no menu:

&#60;ul id=&#34;menu&#34;&#62;
	&#60;li&#62;
 &#60;a href=&#34;#&#34;&#62;Empresa&#60;/a&#62;
&#60;ul&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Sub Menu 1&#60;/a&#62;&#60;/li&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Sub Menu 2&#60;/a&#62;&#60;/li&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Sub Menu 3&#60;/a&#62;&#60;/li&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Sub Menu 4&#60;/a&#62;&#60;/li&#62;
&#60;/ul&#62;
&#60;/li&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Conteúdo&#60;/a&#62;
&#60;ul&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Sub Menu 1&#60;/a&#62;&#60;/li&#62;
	&#60;li&#62;&#60;a [...]]]></description>
			<content:encoded><![CDATA[<p>O JQuery torna este tipo de efeito muito fácil de ser implementado. Veremos aqui como é simples.</p>
<p>Primeiro é necessário uma lista com sublistas internas que funcionarão como nosso menu e submenus respectivamente.</p>
<p>Abaixo o codigo no menu:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;menu&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
 <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Empresa<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 4<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Conteúdo<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 4<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Conteúdo 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 4<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
 <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Informativo<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 1<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 2<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 3<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">li</span>&gt;&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;#&quot;</span>&gt;</span>Sub Menu 4<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">li</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">ul</span>&gt;</span></pre></div></div>

<p>Em seguida, obviamente usaremos o CSS pra dar um look agradável para o menu. Repare que diferentemente do usual display:none que geralmente é utilizado em submenus, aqui não é necessário devido ao JQuery.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #00AA00;">*</span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #00AA00;">&#125;</span>
 body<span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Tahoma</span><span style="color: #00AA00;">,</span>Arial<span style="color: #00AA00;">,</span>Helvetica<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">14px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
 <span style="color: #00AA00;">&#125;</span>
 ul <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">dotted</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
 <span style="color: #00AA00;">&#125;</span>
 ul ul<span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
 <span style="color: #00AA00;">&#125;</span>
 ul li a <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f57327</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">outline</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#b8360b</span><span style="color: #00AA00;">;</span>
 <span style="color: #00AA00;">&#125;</span>
 ul li li a <span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">13px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f59247</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span></pre></div></div>

<p>Agora a mágica do JQuery, para atingir o efeito esperado usamos primeiro o &#8220;hide&#8221; para esconder nossos submenus que serão abertos com o efeito tipo Accordion. Em seguida, o truque: para cada elemento &#8220;a&#8221; é adicionado o evento click que mostra ou esconde nossos menus usando o slide criando um efeito realmente bom.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> initMenu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#menu ul'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#menu li a'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span>
 <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 <span style="color: #003366; font-weight: bold;">var</span> checkElement <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">next</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>checkElement.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span>checkElement.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':visible'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 checkElement.<span style="color: #660066;">slideUp</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'normal'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>checkElement.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;</span>amp<span style="color: #339933;">;&amp;</span>amp<span style="color: #339933;">;</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>checkElement.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':visible'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
 $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#menu ul:visible'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">slideUp</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'normal'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 checkElement.<span style="color: #660066;">slideDown</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'normal'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #009900;">&#125;</span>
 <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>initMenu<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Com este exemplo pode-se notar que é possivel criar efeitos realmente atraentes usando jQuery utilizando muito pouco código, o que agiliza muito o trabalho. O resultado pode ser visto aqui: <a href="http://infinitadesign.com/samples/jquery_simple_accordion_menu.html" target="_blank">preview</a></p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2010/01/02/simple-jquery-accordion-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Botões de validação da W3C sem imagem.</title>
		<link>http://infinitadesign.com/blog/2009/11/05/botoes-de-validacao-da-w3c-sem-imagem/</link>
		<comments>http://infinitadesign.com/blog/2009/11/05/botoes-de-validacao-da-w3c-sem-imagem/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 18:15:10 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[Geral]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/blog/?p=97</guid>
		<description><![CDATA[O grande problema destes botões da W3C é que não se encaixam muito bem em qualquer layout.
 
A solução seria criar outra imagem de botão, mas porque criar um imagem simples se podemos fazer algo com o mesmo efeito usando CSS?
Então utilizando o código abaixo criamos os dois links para a validação:

&#60;a class=&#34;w3cbutton&#34; href=&#34;http://validator.w3.org/check?uri=referer&#34;&#62;
  [...]]]></description>
			<content:encoded><![CDATA[<p>O grande problema destes botões da W3C é que não se encaixam muito bem em qualquer layout.</p>
<p><img class="alignnone" title="Valid CSS" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="" width="88" height="31" /> <img class="alignnone" title="Valid XHTML 1.0 Transitional" src="http://www.w3.org/Icons/valid-xhtml10" alt="" width="88" height="31" /></p>
<p>A solução seria criar outra imagem de botão, mas porque criar um imagem simples se podemos fazer algo com o mesmo efeito usando CSS?</p>
<p>Então utilizando o código abaixo criamos os dois links para a validação:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;w3cbutton&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://validator.w3.org/check?uri=referer&quot;</span>&gt;</span>
   w3c
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span>&gt;</span>
          xhtml 1.0
      <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;w3cbutton&quot;</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://jigsaw.w3.org/css-validator/validator?uri=referer&quot;</span>&gt;</span>
   w3c
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">span</span>&gt;</span>
         css 2.1
      <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">span</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span></pre></div></div>

<p>Aí então aplicamos as regras de formatação CSS para os links.</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.w3cbutton</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ccc</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Tahoma</span><span style="color: #00AA00;">,</span>Arial<span style="color: #00AA00;">,</span>Helvetica<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">8px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#0c479d</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
<span style="color: #6666ff;">.w3cbutton</span> span <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#FECB65</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">3px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>Pronto, o resultado é bem melhor que os enormes botões da w3c não?</p>
<p><a href="http://infinitadesign.com/blog/wp-content/uploads/2009/11/w3cbuttons.jpg" rel="lightbox[97]"><img class="size-full wp-image-104 alignnone" title="w3cbuttons" src="http://infinitadesign.com/blog/wp-content/uploads/2009/11/w3cbuttons.jpg" alt="w3c validation buttons" width="193" height="36" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2009/11/05/botoes-de-validacao-da-w3c-sem-imagem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scite + AS3 + Flex-SDK + PaperVision3D</title>
		<link>http://infinitadesign.com/blog/2009/10/18/scite-as3-flex-sdk-papervision3d/</link>
		<comments>http://infinitadesign.com/blog/2009/10/18/scite-as3-flex-sdk-papervision3d/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 23:38:28 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Geral]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/blog/?p=85</guid>
		<description><![CDATA[Scite se tornou meu editor favorito por ser altamente customizável e tornando-o um editor multilinguagem muito bom. Baseado neste aspecto do scite resolvi agora começar a estudar um pouco de AS3, o Flex e o Papervision usando o scite para editar o código ao invés de utilizar o editor embutido do Flash.
A proposta aqui é [...]]]></description>
			<content:encoded><![CDATA[<p>Scite se tornou meu editor favorito por ser altamente customizável e tornando-o um editor multilinguagem muito bom. Baseado neste aspecto do scite resolvi agora começar a estudar um pouco de AS3, o Flex e o Papervision usando o scite para editar o código ao invés de utilizar o editor embutido do Flash.</p>
<p>A proposta aqui é utilizar o compilador do flex para criar os arquivos SWF sem precisar do flash, deixando o flash somente para edição gráfica do projeto. Para isso é necessário que tenhamos o Flex SDK que pode ser encontrado em:</p>
<blockquote><p><strong>FLEX 3 SDK</strong> : <a href="http://arthurdick.com/projects/as3/" target="_blank">http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3sdk</a></p></blockquote>
<p>Dentro do pacote nos iremos encontrar os compiladores, o framework do Flex, e os players 9 e 10 (Flex 3.4 SDK) &#8211; o pacote tem aproximadamente 200MB descompactado.<br />
O arquivo que procuramos é o mxmlc.exe localizado dentro de &#8220;bin&#8221;, este é o arquivo que irá compilar nosso arquivo &#8220;.as&#8221; e transformá-lo em um &#8220;swf&#8221;. Se quiser comprovar o funcionamento do mesmo é só arrastar um arquivo &#8220;.as&#8221; para o executável e ele irá criar o swf baseado neste script.</p>
<p>O Segundo passo é preparar o SciTE, iremos necessitar o SciTE e do arquivo API e .properties para que o SciTe tenha suporte &#8220;auto-completion&#8221; para AS3.<br />
O SciTE pode ser baixado gratuitamente em:</p>
<blockquote><p><strong>SciTE(2.01)</strong> : <a title="Scite" href="http://www.scintilla.org/SciTE.html" target="_blank">http://www.scintilla.org/SciTE.html</a></p></blockquote>
<p>Os arquivos api e properties podem ser encontrados aqui:</p>
<blockquote><p><strong>SciTE AS3</strong> : <a href="http://arthurdick.com/projects/as3/" target="_blank">http://arthurdick.com/projects/as3/</a></p></blockquote>
<p>Para utilizar a api AS3 pro Scite é necessário adicionar um linha no seu arquivo de configuração:</p>
<blockquote><p>import actionscript<br />
(supondo que o seu arquivo actionscript.properties está no mesmo diretorio que o SciTE caso contrário use: &#8220;import diretorio/actionscript&#8221; onde &#8220;diretorio&#8221; é onde seu arquivo actionscript.properties está)</p></blockquote>
<p>Pronto neste ponto você já é capaz de utilizar autocompletion ao editar arquivos AS3.<br />
Agora a parte importante: Fazer o SciTE utilizar o mxmlc.exe para compilar o script &#8220;.as&#8221;. No meu caso eu adicionei algumas linhas no arquivo actionscript.properties:</p>
<blockquote><p>#location of FlashPlayers<br />
flashplayer10=caminho_para_o_flex_sdk_3.4\runtimes\player\10\win\FlashPlayer.exe<br />
flashplayer9=caminho_para_o_flex_sdk_3.4\runtimes\player\win\FlashPlayer.exe</p></blockquote>
<blockquote><p>#location of mxmlc<br />
mxmlc=caminho_para_o_flex_sdk_3.4\flex_sdk_3.4\bin\mxmlc.exe</p></blockquote>
<p>e editei algumas linhas de ações do menu:</p>
<blockquote><p>#disable default flash commands<br />
command.go.subsystem.*.as=1<br />
command.compile.$(file.patterns.actionscript)=$(mxmlc) $(FileNameExt)<br />
command.go.$(file.patterns.actionscript)=$(flashplayer10) $(FileName).swf</p></blockquote>
<p>Pronto! Agora é só usar Crtl+F7 para compilar o arquivo e F5 para executá-lo usando o flashplayer 9 ou 10.</p>
<p>Depois de fazer esse &#8220;trajeto&#8221; todo eu ainda queria o papervision, o qual quero muito utilizar:</p>
<blockquote><p><strong>Papervision</strong> : <a href="http://code.google.com/p/papervision3d">http://code.google.com/p/papervision3d</a>/</p></blockquote>
<p>Neste ponto já é fácil incluir este framework junto com o Flex, só é preciso baixar o arquivo compilado .swc (Papervision3D_2.0.883.swc na data deste post) e copiá-lo para dentro do diretório frameworks\libs (que também contém o framework do flex)</p>
<p>So far so good&#8230;<br />
Neste ponto o SciTE já é capaz de compilar scripts AS3 sem precisar do flash e utilizar o framework PaperVision3D. Só pra testar utilizei o mesmo script que já havia postado aqui e funcionou normalmente.</p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2009/10/18/scite-as3-flex-sdk-papervision3d/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>CSS Font Stacks!</title>
		<link>http://infinitadesign.com/blog/2009/10/16/css-font-stacks/</link>
		<comments>http://infinitadesign.com/blog/2009/10/16/css-font-stacks/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 03:11:28 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/blog/?p=79</guid>
		<description><![CDATA[Este é um problema muito comum ao se criar websites é manter a tipografia pelo menos com a mesma &#8220;cara&#8221; independente do sistema operacional.
Dependendo do sistema operacional os tipos de fontes instaladas &#8211; e estas serão usadas na renderização do texto do seu website, por isso é necessário criar as chamadas &#8220;Font Stacks&#8221; que são [...]]]></description>
			<content:encoded><![CDATA[<p>Este é um problema muito comum ao se criar websites é manter a tipografia pelo menos com a mesma &#8220;cara&#8221; independente do sistema operacional.</p>
<p>Dependendo do sistema operacional os tipos de fontes instaladas &#8211; e estas serão usadas na renderização do texto do seu website, por isso é necessário criar as chamadas &#8220;Font Stacks&#8221; que são &#8220;cadeias&#8221; de fontes que serão utilizadas para renderizar o seu texto. O princípio é simples, é preciso definir a propriedade &#8220;font-family&#8221; no CSS de modo que siga uma ordem de uso. Por exemplo:</p>
<pre style="padding-left: 30px;" lang="css">body{
font-family:Verdana,Geneva,sans-serif;
}</pre>
<p>Neste caso, a primeira tentativa de uso seria  a &#8220;Verdana&#8221; que está presente na maioria dos sistemas, se por um acaso não houver suporte para esta fonte, é utilizada a segunda fonte Geneva, num caso raro onde não encontrada esta segunda será utilizada a ultima fonte que é o tipo de fonte genérico &#8220;Sans-serif&#8221;.</p>
<p>A partir dessa ideologia e após uma busca pela internet encontrei vários casos onde são mostrados <em>font stacks </em>interessantes, esta foi a que achei melhor:</p>
<p>The &#8216;wide&#8217; sans serif stack</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Verdana</span><span style="color: #00AA00;">,</span>Geneva<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The &#8216;narrow&#8217; sans serif stack</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Tahoma</span><span style="color: #00AA00;">,</span>Arial<span style="color: #00AA00;">,</span>Helvetica<span style="color: #00AA00;">,</span><span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The &#8216;wide&#8217; serif stack</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Georgia</span><span style="color: #00AA00;">,</span>Utopia<span style="color: #00AA00;">,</span>Palatino<span style="color: #00AA00;">,</span><span style="color: #ff0000;">'Palatino Linotype'</span><span style="color: #00AA00;">,</span><span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The &#8216;narrow&#8217; serif stack</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">'Times New Roman'</span><span style="color: #00AA00;">,</span>Times<span style="color: #00AA00;">,</span><span style="color: #993333;">serif</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>The monospace stack</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">body<span style="color: #00AA00;">&#123;</span><span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span><span style="color: #ff0000;">'Courier New'</span><span style="color: #00AA00;">,</span><span style="color: #ff0000;">'Courier'</span><span style="color: #00AA00;">,</span><span style="color: #993333;">monospace</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre></div></div>

<p><strong>Fontes:</strong></p>
<p><a href="http://www.codestyle.org/css/font-family/BuildBetterCSSFontStacks.shtml#common-font-stacks" target="_blank">http://www.codestyle.org/css/font-family/BuildBetterCSSFontStacks.shtml#common-font-stacks</a><br />
<a href="http://www.codestyle.org/css/font-family/BuildBetterCSSFontStacks.shtml#common-font-stacks" target="_blank">http://www.sitepoint.com/article/eight-definitive-font-stacks/3/</a><br />
<a href="http://www.inspirationbit.com/striking-web-sites-with-font-stacks-that-inspire/" target="_blank">http://www.inspirationbit.com/striking-web-sites-with-font-stacks-that-inspire/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2009/10/16/css-font-stacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Style Sheets CSS tips &amp; tricks</title>
		<link>http://infinitadesign.com/blog/2009/08/06/web-style-sheets-css-tips-tricks/</link>
		<comments>http://infinitadesign.com/blog/2009/08/06/web-style-sheets-css-tips-tricks/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 12:46:09 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[Geral]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/?p=74</guid>
		<description><![CDATA[Algumas dicas e truques encontradas no site da w3c.


Figures &#38; captions
A pinned-down menu
Indented paragraphs
Alternative style sheets
A confetti menu
Getting rid of colored scrollbars     (user style sheets)
Even/odd: coloring every other row
A tabbed interface
A chart comparing font styles
Horizontal and vertical centering
Boxes with drop shadows
Text shadows
Rounded boxes and unsharp shadows


fonte:http://www.w3.org/Style/Examples/007/
]]></description>
			<content:encoded><![CDATA[<p>Algumas dicas e truques encontradas no site da w3c.</p>
<ol>
<blockquote>
<li><a href="http://www.w3.org/Style/Examples/007/figures">Figures &amp; captions</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/menus">A pinned-down menu</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/indent">Indented paragraphs</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/alternatives">Alternative style sheets</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/maps">A confetti menu</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/scrollbars">Getting rid of colored scrollbars     (user style sheets)</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/evenodd">Even/odd: coloring every other row</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/target">A tabbed interface</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/fonts">A chart comparing font styles</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/center">Horizontal and vertical centering</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/shadows">Boxes with drop shadows</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/text-shadow">Text shadows</a></li>
<li><a href="http://www.w3.org/Style/Examples/007/roundshadow">Rounded boxes and unsharp shadows</a></li>
</blockquote>
</ol>
<p>fonte:<a title="Web Style Sheets CSS tips &amp; tricks" href="http://www.w3.org/Style/Examples/007/" target="_blank">http://www.w3.org/Style/Examples/007/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2009/08/06/web-style-sheets-css-tips-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom HTML Form Elements</title>
		<link>http://infinitadesign.com/blog/2009/08/05/checkboxes-radio-buttons-select-lists-custom-html-form-elements/</link>
		<comments>http://infinitadesign.com/blog/2009/08/05/checkboxes-radio-buttons-select-lists-custom-html-form-elements/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 12:36:10 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[Geral]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/?p=68</guid>
		<description><![CDATA[This JavaScript and CSS will allow you to use custom images for checkboxes, radio buttons and select lists.
http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/
]]></description>
			<content:encoded><![CDATA[<blockquote><p>This JavaScript and CSS will allow you to <strong>use custom images</strong> for <strong>checkboxes</strong>, <strong>radio buttons</strong> and <strong>select lists</strong>.</p>
<div id="attachment_69" class="wp-caption alignnone" style="width: 310px"><a href="http://infinitadesign.com/wp-content/uploads/2009/08/customformelements.gif" rel="lightbox[68]"><img class="size-medium wp-image-69" title="customformelements" src="http://infinitadesign.com/wp-content/uploads/2009/08/customformelements-300x115.gif" alt="Custom Form Elements" width="300" height="115" /></a><p class="wp-caption-text">Custom Form Elements</p></div>
<p><a href="http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/" target="_blank">http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/</a></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2009/08/05/checkboxes-radio-buttons-select-lists-custom-html-form-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Menu Fx &#8211; Mootools</title>
		<link>http://infinitadesign.com/blog/2009/07/31/simple-menu-fx-mootools/</link>
		<comments>http://infinitadesign.com/blog/2009/07/31/simple-menu-fx-mootools/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 16:54:00 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[Geral]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/?p=56</guid>
		<description><![CDATA[Um efeito simples para menu usando o Morph do mootools v1.2.3.
Primeiro criamos o menu:

&#60;ul id=&#34;menu&#34;&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Menu Link&#60;/a&#62;&#60;/li&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Menu Link&#60;/a&#62;&#60;/li&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Menu Link&#60;/a&#62;&#60;/li&#62;
	&#60;li&#62;&#60;a href=&#34;#&#34;&#62;Menu Link&#60;/a&#62;&#60;/li&#62;
&#60;/ul&#62;
;

E um pouco de css pra ficar mais visivel:

&#60;!--
* &#123;
	font-family:Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
&#125;
ul#menu &#123;
	width: 200px;
	list-style: none;
&#125;
ul#menu li&#123;
	border-bottom:1px solid #fdfdfd;
	height:20px;
	background:#F9F9F9;
&#125;
ul#menu a &#123;
	text-decoration: none;
	color: #993300;
&#125;
--&#62;

Em seguida o script para o menu funcionar:

window.addEvent&#40;'domready', function&#40;&#41;&#123;
	//Menu
	var menu [...]]]></description>
			<content:encoded><![CDATA[<p>Um efeito simples para menu usando o Morph do mootools v1.2.3.</p>
<p>Primeiro criamos o menu:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;ul id=&quot;menu&quot;&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Link&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Link&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Link&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Menu Link&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
;</pre></div></div>

<p>E um pouco de css pra ficar mais visivel:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;">&lt;!--
<span style="color: #00AA00;">*</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #3333ff;">:Verdana</span><span style="color: #00AA00;">,</span> Arial<span style="color: #00AA00;">,</span> Helvetica<span style="color: #00AA00;">,</span> <span style="color: #993333;">sans-serif</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
ul<span style="color: #cc00cc;">#menu</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">list-style</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
ul<span style="color: #cc00cc;">#menu</span> li<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">border-bottom</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#fdfdfd</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #cc00cc;">#F9F9F9</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
ul<span style="color: #cc00cc;">#menu</span> a <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#993300</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
--<span style="color: #00AA00;">&gt;</span></pre></div></div>

<p>Em seguida o script para o menu funcionar:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">window.<span style="color: #660066;">addEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'domready'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">//Menu</span>
	<span style="color: #003366; font-weight: bold;">var</span> menu  <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'menu'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003366; font-weight: bold;">var</span> li <span style="color: #339933;">=</span> menu.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>x<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>li.<span style="color: #660066;">length</span><span style="color: #339933;">&amp;</span>gt<span style="color: #339933;">;</span>x<span style="color: #339933;">;</span>x<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		el <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span>li<span style="color: #009900;">&#91;</span>x<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		el.<span style="color: #660066;">addEvents</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
			mouseenter<span style="color: #339933;">:</span>
			<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				mouseEnterFx <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Fx.<span style="color: #660066;">Morph</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span><span style="color: #009900;">&#123;</span>fps<span style="color: #339933;">:</span><span style="color: #CC0000;">85</span><span style="color: #339933;">,</span>unit<span style="color: #339933;">:</span><span style="color: #3366CC;">'px'</span><span style="color: #339933;">,</span>duration<span style="color: #339933;">:</span> <span style="color: #CC0000;">250</span><span style="color: #339933;">,</span> transition<span style="color: #339933;">:</span> Fx.<span style="color: #660066;">Transitions</span>.<span style="color: #660066;">linear</span>.<span style="color: #660066;">easeOut</span><span style="color: #339933;">,</span>link<span style="color: #339933;">:</span> <span style="color: #3366CC;">'cancel'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				mouseEnterFx.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>paddingLeft<span style="color: #339933;">:</span><span style="color: #3366CC;">'10'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
			mouseleave<span style="color: #339933;">:</span>
		<span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
				mouseLeaveFx <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Fx.<span style="color: #660066;">Morph</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #339933;">,</span><span style="color: #009900;">&#123;</span>fps<span style="color: #339933;">:</span><span style="color: #CC0000;">85</span><span style="color: #339933;">,</span>unit<span style="color: #339933;">:</span><span style="color: #3366CC;">'px'</span><span style="color: #339933;">,</span>duration<span style="color: #339933;">:</span> <span style="color: #CC0000;">250</span><span style="color: #339933;">,</span> transition<span style="color: #339933;">:</span> Fx.<span style="color: #660066;">Transitions</span>.<span style="color: #660066;">linear</span>.<span style="color: #660066;">easeOut</span><span style="color: #339933;">,</span>link<span style="color: #339933;">:</span> <span style="color: #3366CC;">'cancel'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				mouseLeaveFx.<span style="color: #660066;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>paddingLeft<span style="color: #339933;">:</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Repare no loop &#8220;for&#8221; muito útil para atribuir o efeito a todos os elementos do menu. Neste exemplo foi utilizado o Morph para &#8216;trocar&#8217; o padding da Li que contém o link do menu, fazendo com que ocorra um efeito de movimento.</p>
<p>Code:<a href="http://infinitadesign.com/wp-content/uploads/2009/07/menu.html">menu.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2009/07/31/simple-menu-fx-mootools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mapas vetorizados</title>
		<link>http://infinitadesign.com/blog/2009/07/21/mapas-vetorizados/</link>
		<comments>http://infinitadesign.com/blog/2009/07/21/mapas-vetorizados/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 20:52:46 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[Geral]]></category>
		<category><![CDATA[Maps]]></category>
		<category><![CDATA[Vector]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/2009/07/21/mapas-vetorizados/</guid>
		<description><![CDATA[&#8220;Free vector world maps&#8221;:
http://www.webresourcesdepot.com/free-vector-world-maps-collection/
]]></description>
			<content:encoded><![CDATA[<p>&#8220;Free vector world maps&#8221;:</p>
<p>http://www.webresourcesdepot.com/free-vector-world-maps-collection/</p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2009/07/21/mapas-vetorizados/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS3 module: Multi-column layout</title>
		<link>http://infinitadesign.com/blog/2009/03/06/css3-module-multi-column-layout/</link>
		<comments>http://infinitadesign.com/blog/2009/03/06/css3-module-multi-column-layout/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 17:36:35 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/?p=43</guid>
		<description><![CDATA[Resumindo, o Modulo &#8220;Multi-column&#8221; do CSS3 serve para separar o conteúdo de um elemento em multiplas colunas.

O Módulo Multi-Column é parte das específicões  do CSS3 propostas pela W3C.
This extension to the CSS Box Model opens a new range of possibilities in terms of web design. Multi-column layouts that are so pervasive in the print media [...]]]></description>
			<content:encoded><![CDATA[<p>Resumindo, o Modulo &#8220;Multi-column&#8221; do CSS3 serve para separar o conteúdo de um elemento em multiplas colunas.</p>
<p><a class="image" title="Image:Diagram-css3multicolumn.gif" href="http://www.csscripting.com/wiki/index.php?title=Image:Diagram-css3multicolumn.gif"><img longdesc="/wiki/index.php?title=Image:Diagram-css3multicolumn.gif" src="http://www.csscripting.com/wiki/images/4/4b/Diagram-css3multicolumn.gif" alt="Image:Diagram-css3multicolumn.gif" width="319" height="246" /></a></p>
<p>O <a class="external text" title="http://www.w3.org/TR/2001/WD-css3-multicol-20010118/" rel="nofollow" href="http://www.w3.org/TR/2001/WD-css3-multicol-20010118/">Módulo Multi-Column</a> é parte das específicões  do CSS3 propostas pela <a class="external text" title="http://www.w3.org" rel="nofollow" href="http://www.w3.org/">W3C</a>.</p>
<blockquote><p>This extension to the CSS Box Model opens a new range of possibilities in terms of web design. Multi-column layouts that are so pervasive in the print media (think newspapers, magazines) can now become a reality on the web</p></blockquote>
<p><a title="http://www.csscripting.com" href="http://www.csscripting.com/css-multi-column/example1.php" target="_blank">http://www.csscripting.com/css-multi-column/example1.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2009/03/06/css3-module-multi-column-layout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>47+ Excellent Ajax CSS Forms</title>
		<link>http://infinitadesign.com/blog/2009/02/20/47-excellent-ajax-css-forms/</link>
		<comments>http://infinitadesign.com/blog/2009/02/20/47-excellent-ajax-css-forms/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 12:20:46 +0000</pubDate>
		<dc:creator>andre</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://infinitadesign.com/2009/02/20/47-excellent-ajax-css-forms/</guid>
		<description><![CDATA[Forms needs a solid visual structure, a profound hierarchy of form elements (Fields and Labels), powerful techniques and Functionality (AJAX) to make the form look and work creatively. There is a great bunch of creative, outstanding and individually designed from scratch forms.Thanks to AJAX, we can provide real-time feedback to our users using server-side validation scripts [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Forms needs a solid visual structure, a profound hierarchy of form elements <strong>(Fields and Labels)</strong>, powerful techniques and Functionality <strong>(AJAX)</strong> to make the form look and work creatively. There is a great bunch of creative, outstanding and individually designed from scratch forms.Thanks to AJAX, we can provide real-time feedback to our users using server-side validation scripts and eliminate the need for redundant validation functions and processing data.</p></blockquote>
<blockquote><p>Let’s take a look, hopefully you’ll find new ideas you can develop further on your own.</p></blockquote>
<p><a href="http://www.noupe.com/css/47-excellent-ajax-css-forms.html" target="_blank">http://www.noupe.com/css/47-excellent-ajax-css-forms.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://infinitadesign.com/blog/2009/02/20/47-excellent-ajax-css-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
