<?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>Oncemade &#187; Markup</title>
	<atom:link href="http://oncemade.com/tag/markup/feed/" rel="self" type="application/rss+xml" />
	<link>http://oncemade.com</link>
	<description>Design, Web Dev, Inspiration</description>
	<lastBuildDate>Fri, 09 Jul 2010 02:06:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Renaming and Extending Easy-Clearing, AKA Clearfix</title>
		<link>http://oncemade.com/renaming-and-extending-easy-clearing-aka-clearfix/</link>
		<comments>http://oncemade.com/renaming-and-extending-easy-clearing-aka-clearfix/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 04:25:28 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[clearfix]]></category>
		<category><![CDATA[easy-clearing]]></category>
		<category><![CDATA[group]]></category>
		<category><![CDATA[Markup]]></category>

		<guid isPermaLink="false">http://oncemade.com/?p=642</guid>
		<description><![CDATA[When positioniseverything.net posted an article about clearfix technique, it didn&#x27;t take much for web developers and designers to start adopting [...]]]></description>
			<content:encoded><![CDATA[<p>When <a href="http://positioniseverything.net">positioniseverything.net</a> posted an article about <a href="http://www.positioniseverything.net/easyclearing.html"><em>clearfix</em></a> technique, it didn&#x27;t take much for web developers and designers to start adopting it. Lately, <a href="http://simplebits.com">Dan Cederholm</a> has been talking about renaming the class <em>clearfix</em> to <em>group</em>, which semantically speaking makes a lot more sense. So, let&#x27;s go ahead and rename the class.</p>
<pre><h4>New Easy-Clearing</h4><code>.group:after {
  content: ".";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}</code></pre>

<p>Using <a href="http://www.quirksmode.org/css/condcom.html">conditional comments</a>, let&#x27;s add the proper code to handle <abbr title="Internet Explore 6">IE 6</abbr> and <abbr title="Internet Explore 7">IE 7</abbr> (<abbr title="Internet Explore 8">IE8</abbr> supports the :after pseudo-elements; no extra code is necessary).</p>
<span id="more-642"></span>
<pre><h4>New Easy-Clearing for IE</h4><code>/* IE6 */
* html .group { height: 1%; }

/*IE7 */
.group { min-height: 1px; }</code></pre>
<p>I&#x27;ve been using the <em>group</em> class on my latest projects and I&#x27;d like to share a small tip, when clearing list items, with you.</p>
<p>Normally, we&#x27;d have the <em>group</em> class on every <em>LI</em>, like so:</p>
<pre><h4>Clearing List Items the Old Way</h4><code>&lt;ul class=&quot;comments&quot;&gt;
  &lt;li class=&quot;group&quot;&gt;
    &lt;img src=&quot;carla.jpg&quot; alt=&quot;Carla&amp;#x27;s Picture&quot; /&gt;
    &lt;p&gt;Tiny and I miss you&lt;/p&gt;
  &lt;/li&gt;
  &lt;li class=&quot;group&quot;&gt;
    &lt;img src=&quot;steven.jpg&quot; alt=&quot;Steven&amp;#x27;s Picture&quot; /&gt;
    &lt;p&gt;I need a favor! It will take you 5 seconds.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li class=&quot;group&quot;&gt;
    &lt;img src=&quot;buzz.jpg&quot; alt=&quot;Buzz&amp;#x27;s Picture&quot; /&gt;
    &lt;p&gt;I speak gibberish&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;</code></pre>


<!--more-->
<p>Although the markup doesn&#x27;t look very bad, we can make things better by introducing a new class (<em>groupList</em>) and adding it to the <em>UL</em>.</p>
<pre><h4>Clearing List Items the New Way</h4><code>&lt;ul class=&quot;comments groupList&quot;&gt;
  &lt;li&gt;
    &lt;img src=&quot;carla.jpg&quot; alt=&quot;Carla&amp;#x27;s Picture&quot; /&gt;
    &lt;p&gt;Tiny and I miss you&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;img src=&quot;steven.jpg&quot; alt=&quot;Steven&amp;#x27;s Picture&quot; /&gt;
    &lt;p&gt;I need a favor! It will take you 5 seconds.&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;img src=&quot;buzz.jpg&quot; alt=&quot;Buzz&amp;#x27;s Picture&quot; /&gt;
    &lt;p&gt;I speak gibberish&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;</code></pre>

<p>Phew, the markup looks much cleaner! Now that we&#x27;ve fixed it, let&#x27;s add the <em>.groupList > li</em> selector to the existing <em>.group</em> styles.</p>
<pre><h4>Extending .group</h4><code>.groupList > li,
.group:after {
  content: ".";
  display: block;
  height: 0;
  clear: both;
  visibility: hidden;
}</code></pre>

<p>Wait! How about the beloved <abbr title="Internet Explore">IE</abbr>?

<pre><h4>Extending .group IE</h4><code>/* IE6 */
* html .groupList li,
* html .group { height: 1%; }
* html .groupList li li { height: auto; } /* Resets nested LIs */

/*IE7 */
.group > li,
.group { min-height: 1px; }</code></pre>


<p>
<h4>Browser Support</h4>
<ul class  = "browserComp clearfix">
<li class = "firefoxComp"><span>Firefox</span></li>
<li class = "safariComp"><span>Safari</span></li>
<li class = "chromeComp"><span>Chrome</span></li>
<li class = "operaComp"><span>Opera</span></li>
<li class = "ie7Comp"><span>Internet Explore 7 &#038; 8</span></li>
<li class = "ie6Comp"><span>Internet Explore 6</span></li>
</ul>
</p>]]></content:encoded>
			<wfw:commentRss>http://oncemade.com/renaming-and-extending-easy-clearing-aka-clearfix/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Create Date Badge with WordPress and CSS</title>
		<link>http://oncemade.com/create-date-badge-with-wordpress-and-css/</link>
		<comments>http://oncemade.com/create-date-badge-with-wordpress-and-css/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 03:29:03 +0000</pubDate>
		<dc:creator>Rodrigo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Badge]]></category>
		<category><![CDATA[Date]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://oncemade.com/?p=510</guid>
		<description><![CDATA[This tutorial will walk you through creating date badges with WordPress and CSS. Let&apos;s start of by adding the necessary [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial will walk you through creating date badges with <a href="http://www.wordpress.com" title="WordPress.com">WordPress</a> and <abbr title="Cascading Style Sheets">CSS</abbr>.</p>
<p class="aligncenter"><img src="http://oncemade.com/wp-content/uploads/2009/04/datebadgesample.png" alt="Date Badge Sample" title="Date Badge Sample" width="518" height="180" class="alignnone size-full wp-image-537" /></p>

<p>
  Let&apos;s start of by adding the necessary markup to render the appropriate date format. Create a <em>DIV</em> element with a class of &quot;entryDate&quot; and three children <em>SPANs</em> with respective classes &quot;postMoth&quot;, &quot;postDay&quot;, and &quot;postYear&quot;.<br />
  Add the PHP code to get the post date from the database as shown bellow. For more PHP date format go to <a href="http://us.php.net/date" title="PHP Date Format">http://us.php.net/date</a>
</p>

<pre><h4>Markup</h4><code>&lt;div class=&quot;entryDate&quot;&gt;
   &lt;span class=&quot;postMonth&quot;&gt;&lt;?php the_time(&apos;M&apos;) ?&gt;&lt;/span&gt;
   &lt;span class=&quot;postDay&quot;&gt;&lt;?php the_time(&apos;d&apos;) ?&gt;&lt;/span&gt;
   &lt;span class=&quot;postYear&quot;&gt;&lt;?php the_time(&apos;Y&apos;) ?&gt;&lt;/span&gt;
&lt;/div&gt;</code></pre>

<p>Now let's add styles to make it look pretty.</p>
<span id="more-510"></span>
<p>First of all, set the body <em>font-size</em> to 10px or 62.5%. Then go ahead and set the <em>DIV</em> that wraps the post entry to <em>position: relative</em> so the date badge can be positioned relatively to it. Set <em>margin-left</em> to the width of the date badge plus the gap between the post entry. In this sample the <em>margin-left</em> is set to 4.8em.</p>
<p>Absolute position the <em>entryDate</em> and set the <em>left</em> to the same size as the its parent <em>margin-left</em>. After that, set the width to 3.5em. Next, set all the <em>SPANs</em> inside <em>entryDate</em> as <em>block element</em> (The reason why <em>SPANs</em> are being used instead of <em>DIVs</em> is because if the <em>stylesheet</em> is disabled, the date renders nicely in one line). Don't forget to centered align the text. </p>
<p>Change the appearance as needed, I have changed the size of the text to look more like a calendar and I've set its color to blue and white.</p>


<pre><h4>CSS</h4><code>body { font-size: 62.5%; }
.post { 
    position: relative;
    margin-left: 4.8em;
}
.entryDate { 
    border: 1px solid #999; 
    font-family: Georgia,&quot;Times New Roman&quot;, serif; 
    left: -4.8em; 
    line-height: 1; 
    position: absolute; 
    top: 0; 
    width: 3.5em;
}
.entryDate span { 
    display: block; 
    text-align: center; 
}
.postMonth { 
    text-transform: uppercase; 
    font-size: 1.2em;
    padding-top: 0.3em; 
}
.postDay { font-size: 2em; }
.postYear { 
    background-color: #2358B8; 
    color: #FFF; 
    font-size: 1.2em; 
    padding: 0.3em 0; 
    margin-top: 0.3em;
}

</code></pre>

<p>Don't forget to checkout the live demo</p>

<a href="http://examples.oncemade.com" title="Date Badge Demo" class="demoBtn" target="_blank">Demo</a>

<h4>Browser Support</h4>
<ul class="browserComp clearfix">
   <li class="firefoxComp"><span>Firefox</span></li>
   <li class="safariComp"><span>Safari</span></li>
   <li class="chromeComp"><span>Chrome</span></li>
   <li class="operaComp"><span>Opera</span></li>
   <li class="ie7Comp"><span>Internet Explore 7 &amp; 8</span></li>
<li class="ie6Comp"><span>Internet Explore 6</span></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://oncemade.com/create-date-badge-with-wordpress-and-css/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
