<?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>CSSKarma &#187; CSS</title> <atom:link href="http://www.csskarma.com/blog/tag/css/feed/" rel="self" type="application/rss+xml" /><link>http://www.csskarma.com/blog</link> <description>display your style</description> <lastBuildDate>Tue, 31 Jan 2012 15:18:44 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>The Problem with Media Queries</title><link>http://www.csskarma.com/blog/the-problem-with-media-queries/</link> <comments>http://www.csskarma.com/blog/the-problem-with-media-queries/#comments</comments> <pubDate>Tue, 31 Jan 2012 14:01:03 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Interaction Design]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[media]]></category> <category><![CDATA[mobile]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=1042</guid> <description><![CDATA[I finally got around to reading the new article on A List Apart this morning , &#8220;A Pixel Identity Crisis&#8220;. It basically talks about how some pixels are defined differently than others (based on the &#8220;reference pixel&#8221;), so there can be variations in how 2 devices (Galaxy  Tab and Kindle Fire given as examples in the [...]]]></description> <content:encoded><![CDATA[<p>I finally got around to reading the new article on A List Apart this morning , &#8220;<a
href="http://www.alistapart.com/articles/a-pixel-identity-crisis/">A Pixel Identity Crisis</a>&#8220;. It basically talks about how some pixels are defined differently than others (based on the &#8220;reference pixel&#8221;), so there can be variations in how 2 devices (Galaxy  Tab and Kindle Fire given as examples in the article) with the exact same dimensions can display responsive content differently. A solution was proposed in the form of this absurdly complex media query:</p><pre><code>@media screen and (device-pixel-ratio: 1.5) and (device-width: 683px) and (orientation: landscape), screen and (device-pixel-ratio: 1.5) and (device-width: 400px) and (orientation: portrait) { /* css */ }</code></pre><p>And that&#8217;s not even the whole thing, you still need vendor prefixes to get it to work.<strong> This brings me to my point.</strong></p><p>This intense form of a media query is getting dangerously close to targeting a specific device, which defeats the entire point of responsive design. It&#8217;s all about setting breakpoints, but if your breakpoints get too granular, it&#8217;s no better than targeting an iPhone directly. We have starting points because you need to have starting points, something like 800px, 480px, 320px, right? Typical breakpoints for your media queries. We&#8217;re missing the mark a little with using them out of the box like that though.</p><p><em>Not to point blame at any boilerplates, I think they&#8217;re actually really great to get you started, but when you use them out of the box, you start to get in trouble. They&#8217;re meant to be customized. &#8212; and wow, at least change that pink highlight.</em></p><p>The intention of breakpoints is to identify points where your design gets a little messed up, let&#8217;s say at 600px wide your design gets too cramped. In that case your first breakpoint would be at 600px. It&#8217;s different for every design. If you follow that basic model, you don&#8217;t have to worry about what a reference pixel for a device is. If the resolution for a device is 800px and your breakpoint is at 600px, it will look at intended. <strong>Don&#8217;t worry so much, you&#8217;re already doing it right</strong>.</p><p>As some may know, I&#8217;ve been writing a JavaScript book and I&#8217;ve been studying a lot of the basic history of the Web. Since its early conception we (as a community) have been hacking things together to deal with a device market that is struggling to get its sea legs. Normally what happens is that we&#8217;ll have a period of instability followed by developers &amp; designers scrambling to rethink what they do and hacking something together to make it 100%, then it will get standardized and all the work you did to take a project from 95% to 100% is seen as a pile of dirty hacks (anyone remember the war between JavaScript and jScript?).</p><p><em>Now we use something called <a
href="http://www.modernizr.com/">feature detection</a>, which is <strong>a million times better</strong>.</em></p><p>When you work in the browser vs. on the server there are certain things you can&#8217;t control and you need to manage bottlenecks in the process rather than forcing control over an uncontrollable situation. The devices will do what they&#8217;ll do and if you try and plan for them all you&#8217;ll:</p><ol><li>Go insane</li><li>Go broke purchasing all the devices</li><li>Create so much extra code that it will be unmanageable</li><li>Bog down performance</li><li>Ruin your JavaScript</li><li>Get to a point where it&#8217;s more efficient to detect for a device and serve up new markup on the server (<strong>and nobody wants crap that again</strong>)</li></ol><p>What the moral of the story? I don&#8217;t know, <strong>stop over-thinking everything</strong>. It&#8217;s great to explore new stuff, but even better when you can recognize when new stuff isn&#8217;t that much better than the old stuff.</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/the-problem-with-media-queries/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Book Review: The Book of CSS3</title><link>http://www.csskarma.com/blog/review-book-of-css3/</link> <comments>http://www.csskarma.com/blog/review-book-of-css3/#comments</comments> <pubDate>Sun, 05 Jun 2011 20:17:20 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Design]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[css3]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=918</guid> <description><![CDATA[I started reading Peter Gasston&#8217;s &#8220;The Book of CSS3&#8243; about a month ago and finally had time to finish it up this weekend. Here are my thoughts. I&#8217;d like to preface my thoughts here with a saying that the publisher did send me a free copy of the book with the intention of writing up [...]]]></description> <content:encoded><![CDATA[<p>I started reading <a
href="http://twitter.com/#!/stopsatgreen/">Peter Gasston&#8217;s</a> &#8220;The Book of CSS3&#8243; about a month ago and finally had time to finish it up this weekend. <strong>Here are my thoughts.</strong></p><p>I&#8217;d like to preface my thoughts here with a saying that the publisher did send me a free copy of the book with the intention of writing up a review somewhere. However, if I thought the book was crap I would have sent it right back. You can be assured that it&#8217;s a quality book and appears to be targeting at a mid-level CSS-minded designer/developer.</p><p>If you don&#8217;t want to read through the whole review, I&#8217;d recommend scanning the chapter listing and if there&#8217;s anything that you need real work on, go ahead and buy it. I will say that even in something I&#8217;m researching quite a bit about, I did learn elements of media queries that I didn&#8217;t know beforehand.</p><h3>Chapter Listing</h3><ol><li>Introducing CSS3</li><li>Media Queries</li><li>Selectors</li><li>Pseudo-classes and Pseudo-elements</li><li>Web Fonts</li><li>Text Effects and Typographic Styles</li><li>Multiple Columns</li><li>Background Images</li><li>Border and Box effects</li><li>Color and Opacity</li><li>Gradients</li><li>2D Transformations</li><li>Transitions and Animations</li><li>3D Transformations</li><li>Flexible Box Layout</li><li>Template Layout</li><li>The Future of CSS</li></ol><h3>Overall Content Structure</h3><p>I really liked the chapter order for the book, it made pretty good sense. Starting off with some basic things like selectors and pseudo-classes/elements; the things that are basically &#8220;hey, this is what this looks like&#8221;. There isn&#8217;t a whole lot you can say about CSS selectors, believe me,<a
href="http://www.sitepoint.com/article/tomorrows-css-today"> I&#8217;ve tried</a>.</p><p>Many of the selectors mentioned in the book have been around for a very long time (in Web years), and to be honest, I was confident that they where actually in the original spec for CSS 2.1. That was a small point of confusion.</p><p>However out of place in the overall flow, I did much prefer the chapter on media queries being so far in the front (Ch. 2). After the introduction is seemed like it was amping up to be one of those books where you don&#8217;t get to the really cool stuff until the end, and by the time you&#8217;re there, your tired of reading.</p><p>There are a lot of surprisingly basic things to cover in CSS3 and I think Peter did a good job of architecting the information in a meaningful manner.</p><h3>Things I Really Liked</h3><p>I really liked the chapter on media queries and Peter&#8217;s writing style; he made everything pretty easy to follow.</p><p>The chapter on WebFonts included very current examples like the <a
href="http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/">bullproof @font-face syntax</a>, which makes the book seem very timely.</p><h3>Stuff I didn&#8217;t find super-useful</h3><p>Being completely honest, I&#8217;m tried of hearing about the <a
href="http://www.w3.org/TR/2010/WD-css3-layout-20100429/">template layout model</a>. I first read about it in Andy Clarke&#8217;s Transcending CSS book&#8230; 4 years ago (?). It&#8217;s very cool, and kinda rocks, but being at a point where we can&#8217;t get border radius and gradient working in all browsers, it&#8217;s a far shot away to start using a new layout model.</p><p>The gradient chapter is a little out of date (I think the webkit syntax is changing), but that&#8217;s what happens with books; they get old pretty fast. Other than that there isn&#8217;t a whole lot negative about the book. It&#8217;s a little late to the game in regards to how long we&#8217;ve been dealing with CSS3, but that also means the information is pretty solidified.</p><h3>Conclusion</h3><p>Overall, I did really like the book. It was well written and put together in a unique way. I am however torn in telling you if you should go out and buy it right now because I sort of feel like we&#8217;ve all being practicing most of the techniques in the book for a long time. I found myself getting a little bored at times reading about the color formats, selectors and older things like that.</p><p>If you&#8217;re like me, you&#8217;re really reading a book like this for the cutting edge elements that haven&#8217;t been blogged about over and over again (chapters 13-17) and you don&#8217;t want to read through the CSS3 spec (and you shouldn&#8217;t, because it&#8217;s awful). Those chapters are actually very good and give you a strong base in what&#8217;s coming down the pipe. You can also use the other chapters to tighten up your general CSS3 knowledge.</p><p>I almost feel like I wasn&#8217;t the real target audience for the book, but with that being said, I did still learn enough stuff to justify the price tag. <strong>So should you buy it?</strong> Yea, you should buy it.</p><p>Also, I really like the cover art.</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/review-book-of-css3/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>CSS Performance and OOCSS</title><link>http://www.csskarma.com/blog/css-performance-and-oocss/</link> <comments>http://www.csskarma.com/blog/css-performance-and-oocss/#comments</comments> <pubDate>Mon, 18 Apr 2011 13:49:11 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Design]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[performance]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=896</guid> <description><![CDATA[I&#8217;m in the process right now of signing on for my first speaking gig in since I moved to Boston (thanks to @joedevon) and it got me thinking about performance in CSS; a topic I really haven&#8217;t address in years since I started using my single-line CSS formatting style. Tip: use spaces rather than tabbing [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;m in the process right now of signing on for my first speaking gig in since I moved to Boston (thanks to <a
href="http://twitter.com/joedevon" rel="friend colleague">@joedevon</a>) and it got me thinking about performance in CSS; a topic I really haven&#8217;t address in years since I started using my <a
href="http://csskarma.com/css/csskarma.css" rel="me">single-line CSS formatting style</a>. <strong>Tip:</strong> use spaces rather than tabbing to maintain the alignment across different software since they all treat the &#8220;tab&#8221; differently.</p><p>But I digress.</p><h3>CSS Performance</h3><p>We&#8217;ve all seen the mass of articles &amp; tutorials about <a
href="http://www.youtube.com/watch?v=mHtdZgou0qU">JavaScript performance</a>, how to <a
href="http://www.alfajango.com/blog/the-difference-between-jquerys-bind-live-and-delegate/">optimize jQuery</a>, and the <a
href="http://jsperf.com/browse">JS Performance test suite</a>. The market is flooded, ok, we get it. JavaScript is a beast of the Web that needs to be constantly tamed. It&#8217;s getting better, especially with lightning-fast JS engine , <a
href="http://code.google.com/p/v8/">V8</a> looming around in Chome and NodeJS.</p><p>CSS performance is constantly overshadowed by JS performance (and rightly so), but that doesn&#8217;t mean we shouldn&#8217;t at least take a look at it every now-and-then as a form of checks and balances for our front-end code. After all, something like <a
href="http://developer.yahoo.com/performance/rules.html">90% of the load time for a site happens on the front-end</a> and unless you&#8217;re Google, it&#8217;s probably not <em>all</em> JavaScript (little bit of a big there, sorry fellas).</p><h3>OOCSS</h3><p>Object Oriented CSS goes a little like this:</p><h4>The CSS</h4><pre><code>.rounded{ border-radius:7px; }
.box-shadow{ -moz-box-shadow:0 2px 2px #333;box-shadow:0 2px 0 #333; }
.left{ float:left; }</code></pre><h4>The HTML</h4><pre><code>&lt;div class=&quot;rounded box-shadow left&quot;&gt;&lt;/div&gt; &lt;!--/.rounded .box-shadow .left--&gt;</code></pre><p>You&#8217;re basically just separating out the individual properties you&#8217;ll be using and modifying the HTML to reflect them. It&#8217;s very similar to a framework model in building and styling a site.</p><p>Whether you like it or not, there it is. There&#8217;s a lot of debate over this method, pluses and minuses, loves and hates. The most popular argument against it is that you&#8217;re embedding style information into your HTML and semi-collapses the progressive enhancement model of structure &mdash; presentation &mdash; behavior.</p><p>It&#8217;s tough for me to totally buy into OOCSS for that reason. I stick very closely to progressive enhancement while I&#8217;m building a site and really only stray from that when I&#8217;m styling for a CMS and I need classes like: &#8220;left&#8221;, &#8220;right&#8221;, &#8220;clear&#8221;, etc., which get applied by the user later on.</p><p>So, when styling for use in a CMS, I really do think OOCSS is dead-on. I&#8217;ve yet to fully use it just because I question it&#8217;s maintainability. But from a strictly performance stand point: <strong>Is OOCSS better?</strong> Yea, it&#8217;s better. <a
href="http://www.shauninman.com/archive/2008/05/05/css_qualified_selectors#comment_3940">It does perform better across the board</a> than almost all of the CSS selectors (especially the advanced ones).</p><h3>Lastly, on performance</h3><p>We can all go through ySlow and JSLint to see where we may have some front-end memory leaks but getting down to the granularity of the way we&#8217;re constructing a page (OOCSS vs. non-OOCSS) is tough without running the explicit performance tests.</p><p>As the Web gets more and more advanced and browsers like Chrome pave the way for faster sites, I have no idea what the real answer for CSS performance is, but I do know that <strong>browsers will not help you write better code</strong>. We still need to explore the best practices, be it front-end, back-end or somewhere in the middle.</p><p>I&#8217;d like to get into this in more detail, but I have a group of tourists screaming at eachother in French next to me (trying out a new coffee shop), so I defer to the comments if you&#8217;re at all interesting in the OOCSS debate.</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/css-performance-and-oocss/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Books that made me a better designer</title><link>http://www.csskarma.com/blog/books/</link> <comments>http://www.csskarma.com/blog/books/#comments</comments> <pubDate>Fri, 07 May 2010 17:46:26 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Design]]></category> <category><![CDATA[ajax]]></category> <category><![CDATA[books]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[learning]]></category> <category><![CDATA[mobile]]></category> <category><![CDATA[sketching]]></category> <category><![CDATA[ui]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=819</guid> <description><![CDATA[This is a list of books that have had a big impact on the way I design &#38; developer Web sites. A lot of the content in books now-a-days can be found on various blogs, but the books below all have something in them that I really haven&#8217;t been able to find anywhere else. Transcending [...]]]></description> <content:encoded><![CDATA[<p>This is a list of books that have had a big impact on the way I design &amp; developer Web sites. A lot of the content in books now-a-days can be found on various blogs, but the books below all have something in them that I really haven&#8217;t been able to find anywhere else.</p><div
class="book"><h3>Transcending CSS</h3><p><img
src="http://www.csskarma.com/images/transcendingcss.jpg" alt="Transcending CSS book cover" /></p><p
class="author"><a
href="http://www.stuffandnonsense.co.uk/">Andy Clarke</a></p><p
class="desc">Andy&#8217;s book is obviously very technically good and well written. I certainly got a lot of information like that out of it, but at this point you can find most of it on various blogs. My biggest take away was how Andy spoke about semantics. Specifically using IDs like &#8220;branding&#8221; and &#8220;site-info&#8221; rather than &#8220;header&#8221; and &#8220;footer&#8221;. Up to that point I had just been using &#8220;header&#8221; and &#8220;footer&#8221; because it was how it was done at the time. Andy got me thinking heavily about semantics and naming schema and also opened up a lot of doors for me to really examine how I put together a site instead of blindly do it because it&#8217;s what I&#8217;ve heard is the best.</p></div><p>&nbsp;</p><div
class="book"><h3>Bulletproof Ajax</h3><p><img
src="http://www.csskarma.com/images/bulletproofajax.jpg" alt="Bulletproof Ajax book cover" /></p><p
class="author"><a
href="http://adactio.com/">Jeremy Keith</a></p><p
class="desc">I read this book right around the time I began playing with <a
href="http://jquery.com">jQuery</a> and it made me realize that, however great a library like jQuery may be, it won&#8217;t be around forever and if I don&#8217;t learn how it really works, I&#8217;ll be screwed when it finally disappears like so many other Web technologies. In <em>Bulletproof Ajax</em> I learned how exactly the XMLHTTPRequest worked, what jQuery was doing, and how it made it so easy to work with, all while keeping Web standards in sight and never putting something together that couldn&#8217;t function without JavaScript.</p></div><p>&nbsp;</p><div
class="book"><h3>101 Things I Learned in Architecture School</h3><p><img
src="http://www.csskarma.com/images/101things.jpg" alt="101 Things I Learned in Architecture School book cover" /></p><p
class="author"><a
href="http://www.frederickdesignstudio.com/">Matthew Frederick</a></p><p
class="desc">Drawing lines seems like a stupid thing to want to learn, but that&#8217;s what this book effectively taught me. I learned the importance of some very basic design principles and how to effectively communicate those ideas to others through certain shapes and sketching techniques. <strong>This is a great book</strong>. I really got into it after a talk by <a
href="http://www.lukew.com/">Luke Wroblewski</a> at the Web App Summit in Newport Beach.</p></div><p>&nbsp;</p><div
class="book"><h3>Mobile Web Design</h3><p><img
src="http://www.csskarma.com/images/mobilewebdesign.jpg" alt="Mobile Web Design book cover" /></p><p
class="author"><a
href="http://cameronmoll.tumblr.com/">Cameron Moll</a></p><p
class="desc">The first book to really spark my interest in the Mobile Web. Ever since reading it I&#8217;ve felt like I have a slight edge whenever beginning a project with mobile requirements. Most mobile books now focus on intense graphics and acceleration of devices like the iPhone. In <em>Mobile Web Design</em>, Cameron talks about a plethora of devices and focuses on Web standards rather than cool things you can do.</p></div><p>Obviously, I highly recommend all those these books, as they&#8217;ve had a pretty large impact on me as a designer &amp; a developer. The best part about them is that they&#8217;re all pretty easy reads, they&#8217;re not the kind of books you have to spend a week or 2 reading.</p><p>Does anyone else have books like this? Or do we all just read blogs now?</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/books/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>What You Need to Know About Behavioral CSS</title><link>http://www.csskarma.com/blog/behavioral-css/</link> <comments>http://www.csskarma.com/blog/behavioral-css/#comments</comments> <pubDate>Mon, 21 Dec 2009 16:46:32 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Design]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[article]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[smashing magazine]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=681</guid> <description><![CDATA[Hi all, I had a new article published over the weekend at Smashing Magazine. Check it out and let me know what you think! Behavioral CSS I wrote it quite a while ago and it seems to be showing a bit in the comments, but overall, I&#8217;m pretty happy with the way it came out [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.csskarma.com/blog/wp-content/uploads/smashing-banner1.png" alt="" title="smashing-banner" class="article-banner"/></p><p>Hi all,<br
/> I had a new article published over the weekend at Smashing Magazine. Check it out and let me know what you think!</p><p><a
href="http://www.smashingmagazine.com/2009/12/19/what-you-need-to-know-about-behavioral-css/">Behavioral CSS</a></p><p>I wrote it quite a while ago and it seems to be showing a bit in the comments, but overall, I&#8217;m pretty happy with the way it came out and the reader responses it&#8217;s getting. Hope you enjoy <a
href="http://www.smashingmagazine.com/2009/12/19/what-you-need-to-know-about-behavioral-css/">Behavioral CSS</a></p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/behavioral-css/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Quick Tip #1 &#8211; Image Replacement</title><link>http://www.csskarma.com/blog/qt1-image-replacement/</link> <comments>http://www.csskarma.com/blog/qt1-image-replacement/#comments</comments> <pubDate>Thu, 28 May 2009 14:19:57 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[CSS]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=535</guid> <description><![CDATA[Problem Image replacement can be easily abused; but when used properly (like replacing logo text) it&#8217;s a great resource. Image replacement without extra markup usually means setting text-indent:-9999px on your link. And this works great great. But in a lot of browsers it leaves a focus outline that runs way off the page to the [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.csskarma.com/images/articles/image-replacement.jpg" alt="article banner"/></p><h4>Problem</h4><p>Image replacement can be easily <a
href="http://www.csszengarden.com" rel="external">abused</a>; but when used properly (like replacing logo text) it&#8217;s a great resource.</p><p>Image replacement without extra markup usually means setting <code>text-indent:-9999px</code> on your link. And this works great great. But in a lot of browsers it leaves a focus outline that runs way off the page to the left on click.</p><p><img
src="http://www.csskarma.com/images/articles/logo_beans_error.jpg" alt="welovebeans.com logo with a :focus outline the runs off the page" /></p><p>We need to keep the outline there for accessibility reasons, so most developers just leave it alone. But there&#8217;s a way to make, both, designers and accessibility gurus happy.</p><p
class="viewdemo"><a
href="http://www.csskarma.com/articles/examples/image-replacement/">view demo</a></p><h5>Problem CSS</h5><pre><code>
#branding h1 a{
display:block;
height:70px;
width:289px;
background:url(../images/logo.png) no-repeat 0 0;
<strong>text-indent:-9999px;</strong>
}</code></pre><h4>Goal</h4><p><img
src="http://www.csskarma.com/images/articles/logo_beans_clean.jpg" alt="welovebeans.com logo with proper :focus outline" /></p><h4>Solution</h4><p>By adding <code>overflow:hidden</code> to the link we can cut off the extended :focus outline.</p><h5>Solution CSS</h5><pre><code>
#branding h1 a{
display:block;
height:70px;
width:289px;
background:url(../images/logo.png) no-repeat 0 0;
<strong>text-indent:-9999px;
overflow:hidden;</strong>
}</code></pre><p
class="viewdemo"><a
href="http://www.csskarma.com/articles/examples/image-replacement/">view demo</a></p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/qt1-image-replacement/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>SXSW Notes pt. 3 &#8211; CSS3</title><link>http://www.csskarma.com/blog/sxsw-notes-pt3/</link> <comments>http://www.csskarma.com/blog/sxsw-notes-pt3/#comments</comments> <pubDate>Fri, 20 Mar 2009 14:50:02 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Browsers]]></category> <category><![CDATA[Life]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[sxsw]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=409</guid> <description><![CDATA[This panel had representitives from each vendor (not apple) and they each took turns showcasing the upcoming CSS3 support in their browser. MOZ nth-child selector color module [opacity, rbga] border-image border-radius box-shadow * word-wrap:break-word * font-adjust @font-face @media queries ( @media(width:22em){blah} -moz-transform: skewX(20deg); -webkit-transform: skewX(20deg); Future from MOZ width calculations new layout systems for user [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.csskarma.com/images/articles/sxsw.jpg" alt="article banner"/></p><p>This panel had representitives from each vendor (not apple) and they each took turns showcasing the upcoming CSS3 support in their browser.</p><h4>MOZ</h4><ul><li>nth-child selector</li><li>color module [opacity, rbga]</li><li>border-image</li><li>border-radius</li><li>box-shadow</li><li>* word-wrap:break-word</li><li>* font-adjust</li><li>@font-face</li><li>@media queries ( @media(width:22em){blah}</li><li>-moz-transform: skewX(20deg);</li><li>-webkit-transform: skewX(20deg);</li></ul><h5>Future from MOZ</h5><ul><li>width calculations</li><li>new layout systems for user interface</li></ul><h4>Microsoft &#8211; IE and CSS</h4><ul><li>implementing 2.1</li><li>1st complete implementation on 2.1</li></ul><h5>In IE8</h5><ul><li>no new CSS3 properties</li></ul><h5>Future of CSS in IE</h5><ul><li>opacity</li><li>backgrounds</li><li>web fonts</li><li>media queries</li><li>mutil-column</li></ul><h4>Opera</h4><ul><li>text-shadow (css2)</li><li>webfonts (css2)</li></ul><h5>CSS3</h5><ul><li>backgrounds and borders</li><li>border-radius: 150px / 50px;</li><li>box-shadows, blur, inset</li><li>border-image</li><li>a box css3 style</li><li>css transitions (animations)</li></ul> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/sxsw-notes-pt3/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>This Week in Links 2/18</title><link>http://www.csskarma.com/blog/this-week-in-links-13/</link> <comments>http://www.csskarma.com/blog/this-week-in-links-13/#comments</comments> <pubDate>Wed, 18 Feb 2009 19:30:20 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[News]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[flickr]]></category> <category><![CDATA[json]]></category> <category><![CDATA[navigation]]></category> <category><![CDATA[public speaking]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=354</guid> <description><![CDATA[Surfin&#8217; Safari: CSS Animation Personally, I think animation should be left to JavaScript, but this is actually pretty neat, you have to download the open source version of WebKit to see it, but it&#8217;s definitely worth a look into the future of CSS. Get Your Flickr ID I&#8217;m currently building a refreshed version of cssKarma.com [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.csskarma.com/images/articles/this-week-in-links.jpg" alt="article banner"/></p><h5><a
href="http://webkit.org/blog/324/css-animation-2/" rel="external">Surfin&#8217; Safari: CSS Animation</a></h5><p>Personally, I think animation should be left to JavaScript, but this is actually pretty neat, you have to download the <a
href="http://webkit.org/" rel="external">open source version of WebKit</a> to see it, but it&#8217;s definitely worth a look into the future of CSS.</p><h5><a
href="http://idgettr.com/" rel="external">Get Your Flickr ID</a></h5><p>I&#8217;m currently building a refreshed version of cssKarma.com and I want to display my Flickr photos on the site, but I couldn&#8217;t find my damn ID to grab the JSON feed. This is a neat little app that can quickly get your Flickr ID.</p><h5><a
href="http://cameronmoll.com/archives/2009/02/20_tips_better_conference_speaking/index.html" rel="external">20 Tips for better Conference Speaking</a></h5><p>Cameron Moll lists out 20 great points on how to grab your audience while speaking. Since I know I have this problem from time to time, I thought this was an excellent read and very share&ndash;worthy.</p><h5><a
href="http://aviary.com/home" rel="external">Aviary</a></h5><p>Aviary is like an online version of PhotoShop. But that&#8217;s not why they&#8217;re on this list, I think I&#8217;ve actually posted this link before; but now they have a real slick new navigation menu that I LOVE. Check this out, it&#8217;s very interesting.</p><p><strong>Something else to read over: <a
href="http://xrds-simple.net/" rel="external">XRDS</a></strong></p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/this-week-in-links-13/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Framing an Image</title><link>http://www.csskarma.com/blog/framing-an-image/</link> <comments>http://www.csskarma.com/blog/framing-an-image/#comments</comments> <pubDate>Mon, 09 Feb 2009 05:59:09 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[CSS]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=324</guid> <description><![CDATA[I&#8217;m not sure exactly how well known it is, but you can put a background image on any HTML element&#8230; even an image. I don&#8217;t think I&#8217;ve ever seen it done on a live site before, but it can be very useful for creating an image template for repeated use; without having to do a [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://www.csskarma.com/images/articles/framing-an-image.jpg" alt="article banner"/></p><p>I&#8217;m not sure exactly how well known it is, but you can put a background image on any HTML element&#8230; even an image. I don&#8217;t think I&#8217;ve ever seen it done on a live site before, but it can be very useful for creating an image template for repeated use; without having to do a ton of photo editing. Like in a portfolio or image gallery.</p><p>The goal of this post is to show how you can display a decorative frame around an image with minimal markup (just your img element, and maybe a class).</p><p
class="viewdemo"><a
href="http://www.csskarma.com/articles/examples/background-image/">View Demo</a></p><p>The first thing I like to do when doing any serious CSS for an image is set the <code>display</code> to <code>block</code>. This allows us to do a little more with it since inline elements do have some limitations on them. So let&#8217;s do that:</p><h5>CSS</h5><pre><code>img{
display:block;
}</code></pre><p>Next, we set our background image to the <code>img</code>. I chose a polaroid</p><h5>CSS</h5><pre><code>img{
display:block;
background:url(polaroid.png);
}</code></pre><p>Then set our padding accordingly so the background image shows through, I also floated it left, for some reason.</p><h5>CSS</h5><pre><code>img{
display:block;
background:url(polaroid.png);
padding:19px 25px 80px 17px;
float:left;
}</code></pre><p>And there you have it, a quick and easy way to add some *pop* to images on your site.</p><p><img
src="http://www.csskarma.com/images/articles/dog_polaroid.jpg" alt="show padding"/></p><p
class="viewdemo"><a
href="http://www.csskarma.com/articles/examples/background-image/">View Demo</a></p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/framing-an-image/feed/</wfw:commentRss> <slash:comments>10</slash:comments> </item> <item><title>Centering an Image</title><link>http://www.csskarma.com/blog/centering-an-image/</link> <comments>http://www.csskarma.com/blog/centering-an-image/#comments</comments> <pubDate>Tue, 06 Jan 2009 15:41:56 +0000</pubDate> <dc:creator>Tim</dc:creator> <category><![CDATA[Web Development]]></category> <category><![CDATA[Web Standards]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[xhtml]]></category><guid
isPermaLink="false">http://www.csskarma.com/blog/?p=279</guid> <description><![CDATA[&#60;div align="center"&#62; is deprecated. It&#8217;s been deprecated for a long time, but it keeps creeping up for things like center aligning an image. Another popular way to do this is to wrap an extra div around the image and set the text alignment to center. This creates (as you might know, I hate), an added [...]]]></description> <content:encoded><![CDATA[<p><code>&lt;div align="center"&gt;</code> is <a
rel="external" href="http://webdesign.about.com/od/htmltags/a/bltags_deprctag.htm">deprecated</a>.</p><p>It&#8217;s been deprecated for a long time, but it keeps creeping up for things like center aligning an image.</p><p>Another popular way to do this is to wrap an extra <code>div</code> around the image and set the text alignment to center. This creates (as you might know, I hate), an added layer of XHTML code that you really don&#8217;t need.</p><pre><code>.image-wrap{
text-align:center;
}</code></pre><p>This goes back to one of my pet peeves about using too many <code>divs</code>. Here&#8217;s what I came up with:</p><h5>CSS</h5><pre><code>#content-main img{
display:block;
width:auto;
margin:auto;
}</code></pre><p>That will center your image, and of course you can add a class in if you don&#8217;t want all your images centered.</p><p>Just a quick tip today, as I&#8217;m getting back into the swing of things after vacation. I hope everyone had a good holiday season.</p> ]]></content:encoded> <wfw:commentRss>http://www.csskarma.com/blog/centering-an-image/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 7/14 queries in 0.020 seconds using disk: basic

Served from: www.csskarma.com @ 2012-02-04 02:50:32 -->
