<?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>Spigot Design &#187; css</title>
	<atom:link href="http://spigotdesign.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://spigotdesign.com</link>
	<description>Creative Design &#38; Content Strategy for websites and mobile applications</description>
	<lastBuildDate>Fri, 18 May 2012 23:03:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Faux Crop any size image with CSS</title>
		<link>http://spigotdesign.com/2011/11/crop-any-size-image-with-css/</link>
		<comments>http://spigotdesign.com/2011/11/crop-any-size-image-with-css/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 01:09:16 +0000</pubDate>
		<dc:creator>Bryan Hoffman</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[front end development]]></category>
		<category><![CDATA[Quick Tips]]></category>

		<guid isPermaLink="false">http://spigotdesign.com/?p=4022</guid>
		<description><![CDATA[<p>Here&#8217;s a quick tip on how to crop any sized image through CSS and an extra div. This technique comes in very handy when building websites for clients who don&#8217;t have Photoshop, or understand what 360px x 240px means. In an ideal world every image is edited and cropped before it&#8217;s uploaded to the site, [...]</p><p><a href="http://spigotdesign.com">Spigot Design</a></p><div class="rel-posts">
Related posts:<ol>
<li><a href='http://spigotdesign.com/2011/08/paper-airplane-cobra/' rel='bookmark' title='Paper Airplane: Cobra'>Paper Airplane: Cobra</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://spigotdesign.com/wp-content/uploads/2011/11/crop.jpg" alt="css div image crop" title="crop" /></p>
<p>Here&#8217;s a quick tip on how to crop any sized image through CSS and an extra <code>div</code>. This technique comes in very handy when building websites for clients who don&#8217;t have Photoshop, or understand what 360px x 240px  means. In an ideal world every image is edited and cropped before it&#8217;s uploaded to the site, so that it fits perfectly where it&#8217;s supposed to. Unfortunately that&#8217;s not how it works and many sites end up with squished, stretched, or highly pixellated images. </p>
<p>The key to this technique is to wrap the image you want to display in a container <code>div</code>, which we&#8217;ll give a specific height and width. We&#8217;ll then give the image a width of 100% just in case the user uses an image that&#8217;s too small. Here&#8217;s the code:</p>
<p>The html:</p>
<p class="codeblock">
&lt;div class=&#8221;container&#8221;&gt;<br />
     &lt;img src=&#8221;http://your-source.com&#8221; alt=&#8221;alt&#8221; /&gt;<br />
&lt;/div&gt;
</p>
<p>And the CSS:</p>
<p class="codeblock">
.container { width: 418px; height: 240px; overflow: hidden; }<br />
.container img { width: 100%; }
</p>
<p>The real key there is the <code>overflow: hidden;</code> part. It prevents any image that is larger than the crop area from being displayed. Adding <code>width: 100%;</code> is only helpful when the user uploads an image smaller than the are you want cropped. The image will be enlarged to fit the area &#8211; which may result in some pixellation &#8211; so if crisp images outweigh the need for them to fit correctly, just skip that part.</p>
<p>Happy cropping! And leave a comment.</p>
<div class="rel-posts"><p>Related posts:</p><ol>
<li><a href='http://spigotdesign.com/2011/08/paper-airplane-cobra/' rel='bookmark' title='Paper Airplane: Cobra'>Paper Airplane: Cobra</a></li>
</ol></div><p><a href="http://spigotdesign.com">Spigot Design</a></p>]]></content:encoded>
			<wfw:commentRss>http://spigotdesign.com/2011/11/crop-any-size-image-with-css/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t Minify on the Fly</title>
		<link>http://spigotdesign.com/2011/06/dont-minify-on-the-fly/</link>
		<comments>http://spigotdesign.com/2011/06/dont-minify-on-the-fly/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 18:56:07 +0000</pubDate>
		<dc:creator>Bryan Hoffman</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[minify]]></category>
		<category><![CDATA[site speed]]></category>

		<guid isPermaLink="false">http://spigotdesign.com/?p=3755</guid>
		<description><![CDATA[<p>In the name of speeding up your site you may hear that minifying your CSS is both awesome and easy. I&#8217;ll agree that it&#8217;s very easy, and in the name of speed I can concede a bit to the awesomeness. But if you&#8217;re using @media or @font-face in your stylesheets, be wary of automatic minifying [...]</p><p><a href="http://spigotdesign.com">Spigot Design</a></p><div class="rel-posts">
Related posts:<ol>
<li><a href='http://spigotdesign.com/2010/04/fontsquirrel-com-saves-font-face/' rel='bookmark' title='Fontsquirrel.com saves @font-face'>Fontsquirrel.com saves @font-face</a></li>
<li><a href='http://spigotdesign.com/2010/04/sorry-typekit-youre-unusable-for-now/' rel='bookmark' title='Sorry Typekit, you&#8217;re unusable (for now)'>Sorry Typekit, you&#8217;re unusable (for now)</a></li>
<li><a href='http://spigotdesign.com/2009/05/new-design-theme-switcher/' rel='bookmark' title='New design &amp; theme switcher'>New design &amp; theme switcher</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p><img src="http://spigotdesign.com/wp-content/uploads/2011/06/minify.jpg" alt="Technical drawings of a Mini - made to look a little yesteryear" title="Minify" width="594" height="154" class="alignnone size-full wp-image-3756" /></p>
<p>In the name of speeding up your site you may hear that minifying your CSS is both awesome and easy. I&#8217;ll agree that it&#8217;s very easy, and in the name of speed I can concede a bit to the awesomeness. But if you&#8217;re using <code>@media</code> or <code>@font-face</code> in your stylesheets, be wary of automatic minifying techniques.</p>
<p>I <a href="http://spigotdesign.com/2011/05/go-mobile-with-responsive-design/#comment-2648">found out the hard way</a> (Thanks Steven) that some of these techniques can strip web browsers ability to read <code>@media</code> or <code>@font-face</code> CSS code correctly, resulting in incorrect fonts being displayed, and the responsiveness of media queries rendered useless.</p>
<p><strong>It turns out that I&#8217;d nonchalantly enabled the option to auto-minify stylesheets</strong> at the service I use to distribute this site, <a href="http://www.cloudflare.com/">CloudFlare</a>. Thankfully the option can be turned off and after a quick cache purge, all was well again in the Chrome world. </p>
<p>The lesson I&#8217;ve taken from this is that while it&#8217;s a great idea to minify stylesheets (and JavaScript for that matter), care has to be taken when doing so. Know what you are minifying. And be sure to test across all browsers to ensure that your sites are rendering as intended. </p>
<p><em>As a side-note, it was great to use old school Mini Cooper artwork for this post. I&#8217;ve loved them since I was a kid and still dream about getting one for my mid-life crisis one day.</em></p>
<div class="rel-posts"><p>Related posts:</p><ol>
<li><a href='http://spigotdesign.com/2010/04/fontsquirrel-com-saves-font-face/' rel='bookmark' title='Fontsquirrel.com saves @font-face'>Fontsquirrel.com saves @font-face</a></li>
<li><a href='http://spigotdesign.com/2010/04/sorry-typekit-youre-unusable-for-now/' rel='bookmark' title='Sorry Typekit, you&#8217;re unusable (for now)'>Sorry Typekit, you&#8217;re unusable (for now)</a></li>
<li><a href='http://spigotdesign.com/2009/05/new-design-theme-switcher/' rel='bookmark' title='New design &amp; theme switcher'>New design &amp; theme switcher</a></li>
</ol></div><p><a href="http://spigotdesign.com">Spigot Design</a></p>]]></content:encoded>
			<wfw:commentRss>http://spigotdesign.com/2011/06/dont-minify-on-the-fly/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Admin Bar and Absolute Positioning</title>
		<link>http://spigotdesign.com/2011/03/wordpress-admin-bar-and-absolute-positioning/</link>
		<comments>http://spigotdesign.com/2011/03/wordpress-admin-bar-and-absolute-positioning/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 19:24:21 +0000</pubDate>
		<dc:creator>Bryan Hoffman</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[admin bar]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[hybrid-core]]></category>

		<guid isPermaLink="false">http://spigotdesign.com/?p=3618</guid>
		<description><![CDATA[<p>The latest release of WordPress (3.1) comes with a new &#8216;Admin Bar&#8217; &#8211; a small area at the top of your site that displays (for logged in users) quick links and easy access to some of the most used portions of WordPress. If you happen to have absolutely positioned elements that take their position off [...]</p><p><a href="http://spigotdesign.com">Spigot Design</a></p><div class="rel-posts">
Related posts:<ol>
<li><a href='http://spigotdesign.com/2010/11/rebuilding-spigot-again/' rel='bookmark' title='Rebuilding Spigot (again)'>Rebuilding Spigot (again)</a></li>
<li><a href='http://spigotdesign.com/2010/04/pcfd-site-update/' rel='bookmark' title='PCFD Site Update'>PCFD Site Update</a></li>
<li><a href='http://spigotdesign.com/2009/06/wordpress-2-8-upgrade-error-wp-comments-post/' rel='bookmark' title='WordPress 2.8 Upgrade Error'>WordPress 2.8 Upgrade Error</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-3619" title="bar" src="http://spigotdesign.com/wp-content/uploads/2011/03/bar.jpg" alt="" width="594" height="154" /></p>
<p>The latest release of WordPress (3.1) comes with a new &#8216;Admin Bar&#8217; &#8211; a small area at the top of your site that displays (for logged in users) quick links and easy access to some of the most used portions of WordPress.</p>
<p>If you happen to have absolutely positioned elements that take their position off of the <code>body</code> tag, however, these items will not shift, while everything else is shifted down 28px, the height of the admin bar.</p>
<h4>The Fix</h4>
<p>Luckily it&#8217;s easy enough to fix. If you&#8217;re using a modern WP theme, the body tag will contain the<br />
<code>&lt;php body_class(); ?&gt;</code> (If you&#8217;re using <a href="http://themehybrid.com/">Hybrid</a> the code will be:  <code>&lt;php hybrid_body_class(); ?&gt;</code>). WordPress will use this tag to add the class: <code>.admin-bar</code> to the body tag &#8211; only when the Admin Bar is being shown. You can then use something like the following code in your CSS to fix it:</p>
<p><code>.admin-bar .absolutepositioneditem { top: (previous absolute position + 28)px; }</code></p>
<p><strong>Update:</strong> If you&#8217;re using the <a href="http://themehybrid.com/hybrid-core">Hybrid Core Framework</a> (as all recent sites I&#8217;ve built do), Version 1.0.1  is not adding the class <code>.admin-bar</code> to the body tag. Version 1.1.1 fixes this.</p>
<p><strong>Update 2:</strong>After installing the latest version of Hybrid Core, there seems to be an issue with sidebar registration &#8211; I ended up losing all sidebars. The lesson learned here is to be careful when installing code that isn&#8217;t ready for public release.</p>
<div class="rel-posts"><p>Related posts:</p><ol>
<li><a href='http://spigotdesign.com/2010/11/rebuilding-spigot-again/' rel='bookmark' title='Rebuilding Spigot (again)'>Rebuilding Spigot (again)</a></li>
<li><a href='http://spigotdesign.com/2010/04/pcfd-site-update/' rel='bookmark' title='PCFD Site Update'>PCFD Site Update</a></li>
<li><a href='http://spigotdesign.com/2009/06/wordpress-2-8-upgrade-error-wp-comments-post/' rel='bookmark' title='WordPress 2.8 Upgrade Error'>WordPress 2.8 Upgrade Error</a></li>
</ol></div><p><a href="http://spigotdesign.com">Spigot Design</a></p>]]></content:encoded>
			<wfw:commentRss>http://spigotdesign.com/2011/03/wordpress-admin-bar-and-absolute-positioning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webkit { background: transparent;} bug</title>
		<link>http://spigotdesign.com/2010/04/webkit-background-transparent-bug/</link>
		<comments>http://spigotdesign.com/2010/04/webkit-background-transparent-bug/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 23:43:13 +0000</pubDate>
		<dc:creator>Bryan Hoffman</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://spigotdesign.com/?p=2759</guid>
		<description><![CDATA[<p>I&#8217;m a Huuuuge fan of the Webkit Open Source Project. It&#8217;s the engine behind Safari, Apple&#8217;s browser for both OS X and Windows. If you haven&#8217;t used it, give it a try. It&#8217;s my most favoritist browser. I prefer it&#8217;s Web Inspector over Firefox&#8216;s Firebug plugin. Webkit is the experimental version of Safari and you [...]</p><p><a href="http://spigotdesign.com">Spigot Design</a></p><div class="rel-posts">
Related posts:<ol>
<li><a href='http://spigotdesign.com/2008/11/dropping-future-support-for-ie6/' rel='bookmark' title='Dropping future support for IE6'>Dropping future support for IE6</a></li>
</ol></div>]]></description>
			<content:encoded><![CDATA[<p><a href="http://spigotdesign.com/wp-content/uploads/2010/04/webkit.jpg"><img src="http://spigotdesign.com/wp-content/uploads/2010/04/webkit.jpg" alt="Webkit Icon" title="Webkit" width="160" height="160" class="alignright size-full wp-image-2760" /></a>I&#8217;m a <strong>Huuuuge</strong> fan of the <a href="http://webkit.org/">Webkit Open Source Project</a>. It&#8217;s the engine behind <a href="http://www.apple.com/safari/">Safari</a>, Apple&#8217;s browser for both OS X and Windows.  If you haven&#8217;t used it, give it a try. It&#8217;s my most favoritist browser. I prefer it&#8217;s <a href="http://webkit.org/blog/41/introducing-the-web-inspector/">Web Inspecto</a>r over <a href="http://www.mozilla.com/">Firefox</a>&#8216;s <a href="http://getfirebug.com/">Firebug</a> plugin.</p>
<p><a href="http://nightly.webkit.org/">Webkit</a> is the experimental version of Safari and you can download their nightly build and essentially stay on the bleeding edge of what web browsers can do. You too can be on <a href="http://nightly.webkit.org/">the bleeding edg</a>e, as long as you don&#8217;t mind daily browser updates.</p>
<p>With the recent update of this site, I noticed a minor bug with the way Webkit renders the <code>a:visited {background: transparent;}</code> style. In every other browser the background is rendered as expected: transparent. In Webkit, however, the backgrounds were rendering in pure black.</p>
<p>To fix the problem, I simply changed <code>background: transparent;</code> to <code>background: white;</code> and all was well.</p>
<div class="rel-posts"><p>Related posts:</p><ol>
<li><a href='http://spigotdesign.com/2008/11/dropping-future-support-for-ie6/' rel='bookmark' title='Dropping future support for IE6'>Dropping future support for IE6</a></li>
</ol></div><p><a href="http://spigotdesign.com">Spigot Design</a></p>]]></content:encoded>
			<wfw:commentRss>http://spigotdesign.com/2010/04/webkit-background-transparent-bug/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>YUI Grids vs Blueprint (CSS Frameworks)</title>
		<link>http://spigotdesign.com/2009/03/yui-grids-blueprints-css-frameworks/</link>
		<comments>http://spigotdesign.com/2009/03/yui-grids-blueprints-css-frameworks/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 20:16:13 +0000</pubDate>
		<dc:creator>Bryan Hoffman</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[frameworks]]></category>

		<guid isPermaLink="false">http://spigotdesign.com/?p=1035</guid>
		<description><![CDATA[<p>CSS Frameworks have been around for a while now, and while there are many detractors, the benefits they provide make them an attractive option for speeding up development time, as well as simplifying complex layouts. After pouring through this Top 12 list of CSS Frameworks, the two that stand out the most are Blueprint and YUI [...]</p><p><a href="http://spigotdesign.com">Spigot Design</a></p>
No related posts.]]></description>
			<content:encoded><![CDATA[<p>CSS Frameworks have been around for a while now, and while there are many detractors, the benefits they provide make them an attractive option for speeding up development time, as well as simplifying complex layouts.</p>
<p>After pouring through this <a href="http://speckyboy.com/2008/03/28/top-12-css-frameworks-and-how-to-understand-them/">Top 12 list of CSS Frameworks</a>, the two that stand out the most are <a href="http://www.blueprintcss.org/">Blueprint</a> and <a href="http://developer.yahoo.com/yui/grids/">YUI Grids</a>. I&#8217;ve boiled it down to these two because of their wide spread popularity, and there are one or two things about each that I really like. Deciding between the two though, will be a tougher pick.</p>
<p><span id="more-1035"></span></p>
<h3>YUI</h3>
<p>YUI has quite a few things going for it. The documentation is superb, relative to other frameworks, and they lay out their reasons for structuring their system the way they did. They combat the non-semantic argument by claiming their grid system is a <a href="http://microformats.org/">microformat</a> which attempts to define the structure.</p>
<p>The biggest advantage YUI offers is em based layouts. I&#8217;ve long subscribed to sizing in ems over pixels and YUI would help continue that.</p>
<h3>Blueprint</h3>
<p>Blueprint too, has quite a few things going for it, but the <a href="http://bgg.kematzy.com/">Blueprint Grid CSS Generator</a> might be the slickest tool for setting up a flexible grid system that fits your current project. This tool will create a new version of the grid.css file that replaces the standard file downloaded with the framework. It also creates a grid.png file that can be used in Photoshop comps to help ensure everything lines up properly.</p>
<h3>The Differences</h3>
<p>While both have advantages, they each have shortcomings that the other just happens to overcome. I haven&#8217;t yet found a Photoshop template for use with YUI. That may be because it doesn&#8217;t use set columns for layout, but some kind of template, or directions for newbies on how best to create one would help.</p>
<p>Blueprint uses pixels to set sizes for layout. This makes elasticity not happening.</p>
<h3>Conclusions?</h3>
<p>None yet. Daily, it seems I vacillate between the two.</p>
<p>Do you use a CSS framework? Which one, and why?</p>
<p><strong>UPDATE:</strong> After trying out both on a recent project, I&#8217;ve gone with YUI for the most part, but have swiped a couple of the css files that come with Blueprint, namely the forms.css and typography.css. These give me a nice start on forms and fonts as well as extra control.</p>
<p><strong>UPDATE #</strong>2: Frustration with YUI&#8217;s stylesheets not being self hosted has made me rethink my choice. Since I&#8217;m already using some of Bluprint&#8217;s elements, I&#8217;ve decided to just use it outright. </p>
<p><strong>UPDATE #3</strong>: After discovering Justin Tadlock&#8217;s <a href="http://themehybrid.com/">Hybrid</a> framework for WordPress, I&#8217;ve pretty much given up on grids all together. Hybrid doesn&#8217;t really replace a grid, but it turns out most of my layouts are not complex enough to warrant a grid, and it ends up adding unused elements and needless complexity.</p>
<p>No related posts.</p><p><a href="http://spigotdesign.com">Spigot Design</a></p>]]></content:encoded>
			<wfw:commentRss>http://spigotdesign.com/2009/03/yui-grids-blueprints-css-frameworks/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

