<?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>Smart red fox &#187; htmlSmart red fox</title>
	<atom:link href="http://www.smartredfox.com/category/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.smartredfox.com</link>
	<description>Smarter than your average bear</description>
	<lastBuildDate>Thu, 02 Feb 2012 21:18:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<meta name="generator" content="Obscure 2.0" />
		<item>
		<title>Css portholes</title>
		<link>http://www.smartredfox.com/2011/01/css-portholes/</link>
		<comments>http://www.smartredfox.com/2011/01/css-portholes/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 19:30:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[porthole]]></category>
		<category><![CDATA[rounded]]></category>
		<category><![CDATA[shadows]]></category>

		<guid isPermaLink="false">http://www.smartredfox.com/?p=420</guid>
		<description><![CDATA[This tutorial builds on a previous post for creating a rounded inset image from a square picture, this tutorial adds a complex border to make the image look like a stylish porthole. The parts of the (w)hole The final image is made up of: The original image which has a drop-shadow and border applied via css. A 5px wide border that is grey on 3 sides and white at the top. A dark grey 1px border to define the outer &#8230; <a href="http://www.smartredfox.com/2011/01/css-portholes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p class="download">This tutorial builds on <a href="http://www.smartredfox.com/2011/01/rounded-shadowed-and-shiny-pictures-with-css3/">a previous post</a> for creating a rounded inset image from a square picture, this tutorial adds a complex border to make the image look like a stylish porthole.</p>
<div>
<div id="attachment_341" class="wp-caption alignleft" style="width: 110px"><img class="size-full wp-image-341 colorbox-420" title="squareimage" src="http://www.smartredfox.com/wp-content/uploads/2011/01/squareimage.png" alt="Square image with no rounding or shadowing." width="100" height="100" /><p class="wp-caption-text">Before first post</p></div>
<div id="attachment_361" class="wp-caption alignleft" style="width: 110px"><img class="alignnone size-full wp-image-361 colorbox-420" title="roundedshadowedmaskedglow" src="http://www.smartredfox.com/wp-content/uploads/2011/01/roundedshadowedmaskedglow.png" alt="" width="100" height="100" /><p class="wp-caption-text">After first post</p></div>
<div id="attachment_422" class="wp-caption alignleft" style="width: 110px"><img class="size-full wp-image-422 colorbox-420" title="shadowglowborder" src="http://www.smartredfox.com/wp-content/uploads/2011/01/shadowglowborder.png" alt="" width="100" height="100" /><p class="wp-caption-text">Final image</p></div>
</div>
<h2>The parts of the (w)hole</h2>
<div id="attachment_440" class="wp-caption alignleft" style="width: 288px"><img class="size-full wp-image-440 colorbox-420" title="portholes" src="http://www.smartredfox.com/wp-content/uploads/2011/01/portholes.png" alt="" width="278" height="340" /><p class="wp-caption-text">A side-on view of the porthole</p></div>
<p>The final image is made up of:</p>
<p>The original image which has a drop-shadow and border applied via css.</p>
<p>A 5px wide border that is grey on 3 sides and white at the top.</p>
<p>A dark grey 1px border to define the outer edge.</p>
<h2>Adding content with pseudo-elements</h2>
<p>It&#8217;s not possible to add more than one border to the div that displays the image, but we can add more items to get the additional borders we need. Doing this manually would be a pain, and would create extra html elements which we don&#8217;t need. Fortunately, we can generate everything that we need in css with the :before and :after pseudo elements. This technique is lifted wholesale from <a href="http://nicolasgallagher.com/multiple-backgrounds-and-borders-with-css2/">Nicolas Gallagher&#8217;s website</a>, so look there for more detail on the technique.</p>
<h2>Changes to the original code</h2>
<p>The image itself is moved from the image div and put onto the pseudo :after element we create so that it appears on top of the others. All of the sizes are also changed to match the additional size needed for the borders we are adding.</p>
<p>The new css for the portholes is below:</p>
<p><strong>Css</strong><br />
<code><br />
.image<br />
{<br />
/*Rounded edges*/<br />
-moz-border-radius: 33px; /* FF1+ */<br />
-webkit-border-radius: 33px; /* Saf3-4 */<br />
border-radius: 33px; /* Opera 10.5, IE 9, Saf5, Chrome */ </code></p>
<p>background-repeat:no-repeat;<br />
border:1px solid #CCCCCC;<br />
display:block;<br />
height:66px;<br />
overflow:hidden;<br />
position:relative;<br />
margin:10px;<br />
width:66px;<br />
z-index:1;<br />
}</p>
<p>.image:before<br />
{<br />
content:&#8221;";</p>
<p>/*Rounded edges*/<br />
-moz-border-radius: 33px; /* FF1+ */<br />
-webkit-border-radius: 33px; /* Saf3-4 */<br />
border-radius: 33px; /* Opera 10.5, IE 9, Saf5, Chrome */</p>
<p>position:absolute;<br />
z-index:-1;<br />
top:0px;<br />
left:0px;<br />
right:0px;<br />
bottom:0px;<br />
border:5px solid #ccc;<br />
border-color:#fefefe #f0f0f0 #eaeaea #f0f0f0;<br />
}</p>
<p>.image:after<br />
{<br />
content:&#8221;";<br />
background:#fff url(../images/finance.jpg) no-repeat 0 0;</p>
<p>/*Shadows*/<br />
-moz-box-shadow:inset 0px 2px 8px #333; /* FF3.5+ */<br />
-webkit-box-shadow:inset 0px 2px 8px #000; /* Saf3.0+*/<br />
box-shadow:inset 0px 2px 8px #333; /* Opera 10.5, IE 9 */</p>
<p>/*Glow effect*/<br />
-webkit-mask-box-image:url(../images/circle60pxglow.png);</p>
<p>/*Rounded edges*/<br />
-moz-border-radius: 33px; /* FF1+ */<br />
-webkit-border-radius: 33px; /* Saf3-4 */<br />
border-radius: 33px; /* Opera 10.5, IE 9, Saf5, Chrome */</p>
<p>position:absolute;<br />
z-index:-1;<br />
top:5px;<br />
left:5px;<br />
right:5px;<br />
bottom:5px;<br />
border:1px solid #999;<br />
}</p>
<h2>Internet Explorer</h2>
<p>IE6 and IE7 don&#8217;t recognise the Pseudo elements at all which in this case means that our image won&#8217;t show at all. To work around this we can use a hack to move the background image back to the image div.</p>
<p><strong>Css</strong><br />
Add the following to the .image{} declaration:</p>
<p><code>	/*IE6/7 hacks*/<br />
	*background:#fff url(../images/finance.jpg) no-repeat 0 0;<br />
	*width:60px;<br />
	*height:60px;<br />
</code></p>
<p>Obviously if you&#8217;re using something like Modernizr or conditional comments then you need to drop the hacks and add the appropriate css elsewhere.</p>
<p>If you find this tutorial useful, or have a better way of doing something please let me know in the comments.</p>
<h2>References</h2>
<p>This design would not have been possible without this excellent article by Nicholas Gallagher:<br />
<a href="http://nicolasgallagher.com/multiple-backgrounds-and-borders-with-css2/">http://nicolasgallagher.com/multiple-backgrounds-and-borders-with-css2/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smartredfox.com/2011/01/css-portholes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rounded, shadowed, and shiny pictures with CSS3</title>
		<link>http://www.smartredfox.com/2011/01/rounded-shadowed-and-shiny-pictures-with-css3/</link>
		<comments>http://www.smartredfox.com/2011/01/rounded-shadowed-and-shiny-pictures-with-css3/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 18:29:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.smartredfox.com/?p=340</guid>
		<description><![CDATA[It&#8217;s easy to create round pictures from square ones using just CSS. It does mean using some proprietary css, but it&#8217;s relatively well supported  &#8211; FireFox, Chrome, Safari, Opera, and IE9 are all OK with it. Adding an inner-shadow to make it look like the image is embedded into the page is just as easy, but not quite as well supported with just css (Chrome has problems). Finally adding a shine effect means creating a special image first, and it&#8217;s &#8230; <a href="http://www.smartredfox.com/2011/01/rounded-shadowed-and-shiny-pictures-with-css3/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s easy to create round pictures from square ones using just CSS. It does mean using some proprietary css, but it&#8217;s relatively well supported  &#8211; FireFox, Chrome, Safari, Opera, and IE9 are all OK with it.</p>
<p>Adding an inner-shadow to make it look like the image is embedded into the page is just as easy, but not quite as well supported with just css (Chrome has problems).</p>
<p>Finally adding a shine effect means creating a special image first, and it&#8217;s only supported in WebKit based browsers (Chrome and Safari).</p>
<p>The code below lets you achieve the effect, and it degrades gracefully for browsers that don&#8217;t support parts of the effect.</p>
<div id="attachment_341" class="wp-caption alignleft" style="width: 110px"><img class="size-full wp-image-341 colorbox-340" title="squareimage" src="http://www.smartredfox.com/wp-content/uploads/2011/01/squareimage.png" alt="Square image with no rounding or shadowing." width="100" height="100" /><p class="wp-caption-text">Before</p></div>
<div id="attachment_361" class="wp-caption alignleft" style="width: 110px"><img class="size-full wp-image-361 colorbox-340" title="roundedshadowedmaskedglow" src="http://www.smartredfox.com/wp-content/uploads/2011/01/roundedshadowedmaskedglow.png" alt="" width="100" height="100" /><p class="wp-caption-text">After</p></div>
<hr />
<h2>Getting started</h2>
<p><img class="size-full alignleft wp-image-341 colorbox-340" title="squareimage" src="http://www.smartredfox.com/wp-content/uploads/2011/01/squareimage.png" alt="Square image with no rounding or shadowing." width="100" height="100" /><br />
First we create a single 60px by 60px div with an image added into the background via css. This is the basic starting block.</p>
<hr /><strong>Html:</strong><br />
<code>&lt;div class="image"&gt;&lt;/div&gt;</code></p>
<p><strong>Css:</strong></p>
<p><code>.image</code><code>{</code><br />
<code> background:transparent url(../images/finance.jpg) no-repeat 0 0;<br />
height:60px;<br />
width:60px;</code><br />
}</p>
<h2>Rounding the corners</h2>
<p><img class="size-full wp-image-343 alignleft colorbox-340" title="rounded" src="http://www.smartredfox.com/wp-content/uploads/2011/01/rounded.png" alt="" width="100" height="100" /><br />
Then we round the corners enough to make our div into circle. Note: The radius is half the full width of the circle, so to get a 60px circle we have to set the radius to 30px.</p>
<hr /><strong>Css:</strong><br />
<code>.image{<br />
<strong>-moz-border-radius: 30px; /* FF1+ */<br />
-webkit-border-radius: 30px; /* Saf3-4 */<br />
border-radius: 30px; /* Opera 10.5, IE 9, Saf5, Chrome */</strong></code></p>
<p><code>background:transparent url(../images/finance.jpg) no-repeat 0 0;<br />
height:60px;<br />
width:60px;<br />
}<br />
</code></p>
<div class="note">
<h4>Internet Explorer</h4>
<p>Versions of Internet Explorer prior to version 9 ignore this css completely so we gracefully degrade back to the plain square image.</p>
</div>
<h2>Adding a shadow</h2>
<p><img class="alignleft size-full wp-image-342 colorbox-340" title="roundedshadowed" src="http://www.smartredfox.com/wp-content/uploads/2011/01/roundedshadowed.png" alt="" width="100" height="100" /><br />
To make the image appear to be embedded into the page we can add an inset drop-shadow.</p>
<hr /><strong>Css:</strong></p>
<p><strong><code>.image{</code></strong></p>
<p><strong><code> -moz-box-shadow:inset 0px 2px 8px #333; /* FF3.5+ */<br />
-webkit-box-shadow:inset 0px 2px 8px #000; /* Saf3.0+*/<br />
box-shadow:inset 0px 2px 8px #333; /* Opera 10.5, IE 9 */</code></strong></p>
<p><code> -moz-border-radius: 30px; /* FF1+ */<br />
-webkit-border-radius: 30px; /* Saf3-4 */<br />
border-radius: 30px; /* Opera 10.5, IE 9, Saf5, Chrome */</code></p>
<p><code>background:transparent url(../images/finance.jpg) no-repeat 0 0;<br />
</code><code> </code><code>height:60px;<br />
width:60px;</code></p>
<p>}</p>
<h3>Problems</h3>
<p><img class="alignleft size-full wp-image-344 colorbox-340" title="chromeshadowspill" src="http://www.smartredfox.com/wp-content/uploads/2011/01/chromeshadowspill.png" alt="" width="100" height="100" /><br />
A problem with this layout occurs from an unexpected source; Chrome (as of  version 8.0.552.224) doesn&#8217;t clip the inset shadow properly when used with rounded corners so you get an odd square with our circular image in the middle.</p>
<p>Normally we could just switch the shadow off the for the offending browser and degrade back to something usable. The problem with this is that Safari and Chrome both use the WebKit rendering engine, so both of them would lose the shadow. This doesn&#8217;t seem like the right thing to do when Safari supports this fine.</p>
<h4>The fix, a new problem and a workaround</h4>
<p>It is possible to get Chrome to play ball by doing the clipping ourselves with an image mask.</p>
<p><img class="alignleft size-full wp-image-355 colorbox-340" title="roundedmasked" src="http://www.smartredfox.com/wp-content/uploads/2011/01/roundedmasked.png" alt="" width="100" height="100" /><br />
Initially I tried to do this with an SVG file so that I could apply it to any size circle without having to recreate the image each time. Unfortunately it appears that Chrome also doesn&#8217;t support SVG files being used as masks. The work around is to use a png file with a single white 60px circle.</p>
<hr /><strong>Css:</strong></p>
<p><strong><code>.image{</code></strong></p>
<p><strong><code>-webkit-mask-box-image:url(../images/circle60px.png);</code></strong></p>
<p><strong><code> </code></strong><code>-moz-box-shadow:inset 0px 2px 8px #333; /* FF3.5+ */<br />
-webkit-box-shadow:inset 0px 2px 8px #000; /* Saf3.0+*/<br />
box-shadow:inset 0px 2px 8px #333; /* Opera 10.5, IE 9 */</code></p>
<p><code><code> -moz-border-radius: 30px; /* FF1+ */<br />
-webkit-border-radius: 30px; /* Saf3-4 */<br />
border-radius: 30px; /* Opera 10.5, IE 9, Saf5, Chrome */</code></code></p>
<p><code>background:transparent url(../images/finance.jpg) no-repeat 0 0;<br />
</code><code> </code><code>height:60px;<br />
width:60px;</code></p>
<p>}</p>
<p><strong>Mask:</strong></p>
<div id="attachment_360" class="wp-caption alignnone" style="width: 70px"><img class="size-full wp-image-360   colorbox-340" style="background-color: #e9e9e9;" title="circle60px" src="http://www.smartredfox.com/wp-content/uploads/2011/01/circle60px.png" alt="" width="60" height="60" /><p class="wp-caption-text">circle60px.png</p></div>
<h2>Added bonus for WebKit based browsers &#8211; Glass effect</h2>
<p><img class="alignleft size-full wp-image-361 colorbox-340" title="roundedshadowedmaskedglow" src="http://www.smartredfox.com/wp-content/uploads/2011/01/roundedshadowedmaskedglow.png" alt="" width="100" height="100" /></p>
<p>Because we&#8217;re already using a mask anyway it&#8217;s quite simple to add a shine/glow effect to the image using the mask file. This is completely ignored by FireFox, Opera etc.</p>
<hr /><strong>New mask:</strong></p>
<div id="attachment_362" class="wp-caption alignnone" style="width: 70px"><img class="size-full wp-image-362  colorbox-340" style="background-color: #e9e9e9;" title="circle60pxglow" src="http://www.smartredfox.com/wp-content/uploads/2011/01/circle60pxglow.png" alt="" width="60" height="60" /><p class="wp-caption-text">circle60pxglow.png</p></div>
<p>If you&#8217;ve got any comments, fixes, or suggestions on how to do this better please let me know below.</p>
<div class="download">
<h2>Update</h2>
<p>I&#8217;ve created a <a href="http://www.smartredfox.com/2011/01/css-portholes/">new post showing how to add a porthole style borders</a> onto the image.
</div>
<h3>References:</h3>
<p>Css3 shadows and rounded corners:<br />
<a href="http://css3please.com/">http://css3please.com/</a></p>
<p>Masking:<br />
<a href="http://webkit.org/blog/181/css-masks/">http://webkit.org/blog/181/css-masks/</a></p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 1375px; width: 1px; height: 1px;"><span id="sample-permalink">http://www.smartredfox.com/2011/01/<span id="editable-post-name" title="Temporary permalink. Click to edit this part.">css-portholes</span>/</span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.smartredfox.com/2011/01/rounded-shadowed-and-shiny-pictures-with-css3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free jQuery page peel (updated)</title>
		<link>http://www.smartredfox.com/2010/10/free-jquery-page-peel-updated/</link>
		<comments>http://www.smartredfox.com/2010/10/free-jquery-page-peel-updated/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 09:53:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.smartredfox.com/?p=291</guid>
		<description><![CDATA[The jQuery version of the page peel script has been very popular on SmartRedFox.com, and I&#8217;ve finally got round to making some updates and changes to it. Since I wrote the original article I found this site, which seems to have the original Flash files for the peel effect, as well as a copy of the non-jQuery version of the files. So, if you want to edit the .fla files, or you don&#8217;t want to use jQuery to display the &#8230; <a href="http://www.smartredfox.com/2010/10/free-jquery-page-peel-updated/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The jQuery version of the page peel script has been very popular on SmartRedFox.com, and I&#8217;ve finally got round to making some updates and changes to it.</p>
<p>Since I wrote the original article I found <a href="http://www.marcofolio.net/webdesign/create_a_peeling_corner_on_your_website.html" target="_blank">this site</a>, which seems to have the original Flash files for the peel effect, as well as a copy of the non-jQuery version of the files. So, if you want to edit the .fla files, or you don&#8217;t want to use jQuery to display the page peel you may want to head over there now.</p>
<h2>Updates:</h2>
<ul>
<li>The most requested feature for the original script was for it to <strong>open the link in the same window</strong>. This is now a configurable option. (Note: I&#8217;ve changed the default to be that the link opens in the same window).</li>
<li>I&#8217;ve changed the default images to make it easier to create your own.</li>
<li>Stopped the dotted outline from appearing when you click on the advert.</li>
<li>Assorted other fixes.</li>
</ul>
<p>To use the new page peel edit the peel.js file to match your set-up:</p>
<ul>
<li><strong>smartredfox.link_url</strong> &#8211; This is the full url (including http://) that you want users to go to when they click your advert.</li>
<li><strong>smartredfox.newWindow &#8211; </strong>Set this to true if you want the link_url to be opened in a new window.</li>
<li><strong>smartredfox.small_image</strong> &#8211; This is the full path to the image users see when the image loads.</li>
<li><strong>smartredfox.big_image</strong> &#8211; This is the full path to the big image that appears when users roll over the page peel.</li>
<li><strong>smartredfox.small_path</strong> &#8211; This is the full path to the small.swf file.</li>
<li><strong>smartredfox.big_path</strong> &#8211; This is the full path to the large.swf file.</li>
</ul>
<p>Then include the peel.js file and jQuery in the head of your website:</p>
<pre class="brush: xhtml">
	  &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
	  &amp;lt;script src=&amp;quot;peel.js&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
</pre>
<p><a class="pillbutton super large red" href="http://www.smartredfox.com/wp-content/uploads/2010/10/PagePeel_SRF.zip" onClick="javascript: pageTracker._trackPageview('/downloads/peel');"><span>Download now</span></a> <a class="pillbutton super large blue" href="/demos/peel/index.htm" target="_blank"><span>View demo</span></a></p>
<p>If you have any feedback or feature requests please post them in the comments below.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-3921669375576540";
google_ad_slot = "5432952433";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smartredfox.com/2010/10/free-jquery-page-peel-updated/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>First impressions of YAML</title>
		<link>http://www.smartredfox.com/2008/10/first-steps-with-yaml/</link>
		<comments>http://www.smartredfox.com/2008/10/first-steps-with-yaml/#comments</comments>
		<pubDate>Tue, 21 Oct 2008 14:53:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[YAML]]></category>

		<guid isPermaLink="false">http://www.smartredfox.com/?p=45</guid>
		<description><![CDATA[Okay, I&#8217;ll be honest I&#8217;m a bit of a magpie when it comes to web development, and in particular css frameworks. One week I&#8217;ll be telling everyone that&#8217;ll listen (which isn&#8217;t many people) about how great YUI is, and the next week I&#8217;ll be waxing lyrical about the excellent Blueprint framework. So with that little disclaimer out of the way, here&#8217;s my take on the rather excellent YAML CSS framework, and my first foray into using it to layout a &#8230; <a href="http://www.smartredfox.com/2008/10/first-steps-with-yaml/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.smartredfox.com/wp-content/uploads/2008/10/yaml.png"><img class="alignright size-full wp-image-65 colorbox-45" style="border: 1px solid #ccc;" title="yaml" src="http://www.smartredfox.com/wp-content/uploads/2008/10/yaml.png" alt="YAML logo" width="225" height="169" /></a>Okay, I&#8217;ll be honest I&#8217;m a bit of a magpie when it comes to web development, and in particular css frameworks. One week I&#8217;ll be telling everyone that&#8217;ll listen (which isn&#8217;t many people) about how great YUI is, and the next week I&#8217;ll be waxing lyrical about the excellent Blueprint framework.</p>
<p>So with that little disclaimer out of the way, here&#8217;s my take on the rather excellent YAML CSS framework, and my first foray into using it to layout a site.</p>
<p>First things first; YAML seems to be very well thought out. It claims to be cross browser compliant in almost every browser that&#8217;s still in use by more than one man and his dog, and it fixes most of the major problems web developers run into with the older browsers.</p>
<p>Unlike YUI and some of the other Frameworks you&#8217;ll need to download the css files etc. and host them yourself. These can all be downloaded from <a title="Go to the download page." href="http://www.yaml.de/en/download.html" target="_blank">here.</a></p>
<p>YAML lets you get off to a flying start without any real work creating css reset files etc. After slicing and dicing a design I&#8217;ve been working on for a week I managed to get a site up and running cross-browser on the first attempt. This seems to happen very rarely for me. I&#8217;ll admit there were a few tweaks here and there to make it perfect, but overall it just worked.</p>
<p>It&#8217;s got a few default styles that are well thought out and I&#8217;m already finding myself duplicating them in other projects I work on that don&#8217;t use YAML. I&#8217;ll cover details of some of these styles and a bit more on how to use the framework in later posts.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-3921669375576540";
google_ad_slot = "1444433905";
google_ad_width = 200;
google_ad_height = 200;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smartredfox.com/2008/10/first-steps-with-yaml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Min-height in IE6</title>
		<link>http://www.smartredfox.com/2008/05/min-height-in-ie6/</link>
		<comments>http://www.smartredfox.com/2008/05/min-height-in-ie6/#comments</comments>
		<pubDate>Tue, 20 May 2008 11:05:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[bug]]></category>

		<guid isPermaLink="false">http://www.smartredfox.com/?p=7</guid>
		<description><![CDATA[We all know the problem: You need to set a minimum height on an object but IE6 ignores it and ruins your layout. Well worry no more, there is a simple fix: selector { min-height:500px; height:auto !important; height:500px; } This takes advantage of two IE6 bugs: IE6 ignores the !important and sets the height using the last line. IE6 treats height like it should treat min-height and lets child objects cause the parent to expand. I found this helpful solution &#8230; <a href="http://www.smartredfox.com/2008/05/min-height-in-ie6/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We all know the problem: You need to set a minimum height on an object but IE6 ignores it and ruins your layout. Well worry no more, there is a simple fix:</p>
<p><code>selector {<br />
min-height:500px;<br />
height:auto !important;<br />
height:500px;<br />
}</code></p>
<p>This takes advantage of two IE6 bugs:</p>
<ol>
<li>IE6 ignores the !important and sets the height using the last line.</li>
<li>IE6 treats height like it should treat min-height and lets child objects cause the parent to expand.</li>
</ol>
<p>I found this <a title="./with Imagination" href="http://www.dustindiaz.com/min-height-fast-hack/" target="_blank">helpful solution here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smartredfox.com/2008/05/min-height-in-ie6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Keeping your footer at the bottom of the page</title>
		<link>http://www.smartredfox.com/2008/04/keeping-your-footer-at-the-bottom-of-the-page/</link>
		<comments>http://www.smartredfox.com/2008/04/keeping-your-footer-at-the-bottom-of-the-page/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 13:12:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[footer]]></category>

		<guid isPermaLink="false">http://www.smartredfox.com/?p=6</guid>
		<description><![CDATA[Created a site design but keep getting white space showing below your loving crafted footer? Me too, a bit of research later and I&#8217;ve found a fix that works well, integrates with the yui framework, and seems to work well cross-browser. The basic principle is pretty simple. Make the body 100% tall no matter what. Give it a negative bottom margin the size of your footer. Move you footer up into the space left by the bottom margin There&#8217;s a &#8230; <a href="http://www.smartredfox.com/2008/04/keeping-your-footer-at-the-bottom-of-the-page/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Created a site design but keep getting white space showing below your loving crafted footer? Me too, a bit of research later and I&#8217;ve found a fix that works well, integrates with the yui framework, and seems to work well cross-browser.</p>
<p>The basic principle is pretty simple.</p>
<ul>
<li>Make the body 100% tall no matter what.</li>
<li>Give it a negative bottom margin the size of your footer.</li>
<li>Move you footer up into the space left by the bottom margin</li>
</ul>
<p>There&#8217;s a few other steps to make it work cross-browser (ie6+) but that&#8217;s basically it.</p>
<p>I found the solution <a href="http://fortysevenmedia.com/blog/archives/making_your_footer_stay_put_with_css/">here</a>.</p>
<p><a href="http://fortysevenmedia.com/blog/archives/making_your_footer_stay_put_with_css/"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.smartredfox.com/2008/04/keeping-your-footer-at-the-bottom-of-the-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image button not aligning vertically with input box</title>
		<link>http://www.smartredfox.com/2008/04/image-submit-button-not-aligning-with-input-box/</link>
		<comments>http://www.smartredfox.com/2008/04/image-submit-button-not-aligning-with-input-box/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 13:07:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.smartredfox.com/?p=5</guid>
		<description><![CDATA[This is an odd problem. You have a perfectly normal search box with a go button next to it &#8211; a classic layout some might say. The problem is that the go button seems to sit about half-way up the side of the search box. Now, having tried to fix css/html problems cross-browser before, I was fully expecting to spend a few hours looking for solutions trying them in FF, IE etc. and then mixing and matching my perfect solution&#8230; &#8230; <a href="http://www.smartredfox.com/2008/04/image-submit-button-not-aligning-with-input-box/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="mceTemp"><img class="size-full wp-image-159 alignleft colorbox-5" style="border: 1px solid #cccccc; margin: 10px;" title="Mis-aligned button in IE7" src="http://www.smartredfox.com/wp-content/uploads/2008/04/misalignedbutton.png" alt="Mis-aligned button in IE7" width="144" height="56" /></div>
<p>This is an odd problem. You have a perfectly normal search box with a go button next to it &#8211; a classic layout some might say. The problem is that the go button seems to sit about half-way up the side of the search box.  Now, having tried to fix css/html problems cross-browser before, I was fully expecting to spend a few hours looking for solutions trying them in FF, IE etc. and then mixing and matching my perfect solution&#8230; In this case I was stopped short&#8230; Very short in fact. The fix is simple as adding a position:absolute to the button. Problem solved.  See <a href="http://blog.taragana.com/index.php/archive/how-to-perfectly-align-image-button-with-html-input-textbox/">here</a> for where I found the fix.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smartredfox.com/2008/04/image-submit-button-not-aligning-with-input-box/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing spaces below images in FF &amp; Safari</title>
		<link>http://www.smartredfox.com/2008/03/removing-spaces-below-images-in-ff-safari/</link>
		<comments>http://www.smartredfox.com/2008/03/removing-spaces-below-images-in-ff-safari/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 12:24:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://www.smartredfox.com/?p=4</guid>
		<description><![CDATA[Here&#8217;s an annoying problem. A site renders perfectly in IE6 (this alone is surprising) but in Firefox2 and Safari it shows a 4px space below each image: Images naturally sit on the baseline. This means that they&#8217;re about 4px up from the bottom normally. Setting vertical-align: bottom or display:block seems to clear it. The solution for this was found here.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an annoying problem. A site renders perfectly in IE6 (this alone is surprising)  but in Firefox2 and Safari it shows a 4px space below each image:</p>
<p>Images naturally sit on the baseline. This means that they&#8217;re about 4px up from the bottom normally. Setting vertical-align: bottom or display:block seems to clear it.</p>
<p>The solution for this was found <a href="http://archivist.incutio.com/viewlist/css-discuss/45493">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smartredfox.com/2008/03/removing-spaces-below-images-in-ff-safari/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Centering absolutely positioned elements</title>
		<link>http://www.smartredfox.com/2008/03/centering-absolutely-positioned-elements/</link>
		<comments>http://www.smartredfox.com/2008/03/centering-absolutely-positioned-elements/#comments</comments>
		<pubDate>Fri, 14 Mar 2008 19:46:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[centering]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.smartredfox.com/?p=3</guid>
		<description><![CDATA[Having problems setting auto margins on an absolutely positioned element? Me too&#8230; until I found that I was missing one simple bit of css. When centering an absolutely positioned element horizontally you have to specify the left and right properties as zero for this to work! I found the solution here but I thought I&#8217;d note it down for all those people that may not have come across this themselves. Somehow it seems to have passed me by&#8230; Auto-margins can &#8230; <a href="http://www.smartredfox.com/2008/03/centering-absolutely-positioned-elements/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Having problems setting auto margins on an absolutely positioned element? Me too&#8230; until I found that I was missing one simple bit of css.</p>
<p>When centering an absolutely positioned element horizontally you have to specify the left and right properties as zero for this to work!</p>
<p>I found the <a href="http://css-discuss.incutio.com/?page=CenteringBlockElement" title="Incutio.com">solution here</a> but I thought I&#8217;d note it down for all those people that may not have come across this themselves. Somehow it seems to have passed me by&#8230;</p>
<blockquote><p> Auto-margins can center an absolutely positioned element inside its containing block.</p>
<p>For this to work, you have to</p>
<ul>
<li> specify the offset properties (of opposite sides) with same values, i.e. by setting  <tt> left:0; right:0;</tt> for horizontal centering and <tt> top:0; bottom:0;</tt> for vertical centering,</li>
<li> set dimensions along the axis you want to center along,</li>
<li> enable auto-margins along the axis you want to center along.</li>
</ul>
<p>Internet Explorer note: IE6 can not relate absolutely positioned elements to opposite sides of containing block, so only one of the offset properties is used. This brings the element out of balance and renders auto-margins useless.</p></blockquote>
<p>I hope someone finds this useful&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.smartredfox.com/2008/03/centering-absolutely-positioned-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

