<?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>PhilFreo.com &#187; CSS</title>
	<atom:link href="http://philfreo.com/blog/category/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://philfreo.com/blog</link>
	<description>The portfolio and blog of Phil Freo, on web design, development, and entrepreneurship.</description>
	<lastBuildDate>Mon, 18 Jan 2010 07:33:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Largest website width to support 1024&#215;768 resolution</title>
		<link>http://philfreo.com/blog/largest-website-width-to-support-1024x768-resolution/</link>
		<comments>http://philfreo.com/blog/largest-website-width-to-support-1024x768-resolution/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 04:47:13 +0000</pubDate>
		<dc:creator>Phil Freo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://philfreo.com/blog/?p=207</guid>
		<description><![CDATA[Currently, web designers are advised to support browser resolutions of widths 1024px and greater based on current browser usage data.  The idea is that you want your site&#8217;s design to look good, and not require a horizontal scroll bar for those users.  But screen resolution and browser width are not the same thing, [...]]]></description>
			<content:encoded><![CDATA[<p>Currently, web designers are advised to support browser resolutions of widths 1024px and greater based on current browser usage data.  The idea is that you want your site&#8217;s design to look good, and not require a horizontal scroll bar for those users.  But screen resolution and browser width are not the same thing, because of browser chrome, scroll bars, and because many users browse without their window being maximized.<br />
<span id="more-207"></span></p>
<p>Common advice is that for the 1024 resolutions you have a maximum width of around <a rel="nofollow" href="http://www.cameronmoll.com/archives/001220.html">960</a> or 980px to work with.  <strong>But if you really need to get every last pixel in, I can confirm test results from Windows XP running at 1024&#215;768, with Internet Explorer 6.0 fully maximized, gives you a width of 1007px to work with.</strong></p>
<p>* Of course, fluid layouts are also nice.</p>
]]></content:encoded>
			<wfw:commentRss>http://philfreo.com/blog/largest-website-width-to-support-1024x768-resolution/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fixing Safari&#8217;s 1px background-image centering bug</title>
		<link>http://philfreo.com/blog/fixing-safaris-1px-background-image-centering-problem/</link>
		<comments>http://philfreo.com/blog/fixing-safaris-1px-background-image-centering-problem/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 04:58:31 +0000</pubDate>
		<dc:creator>Phil Freo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://philfreo.com/blog/?p=110</guid>
		<description><![CDATA[I&#8217;m working on slicing and CSS for a new theming project for Magento Commerce and was plagued with a CSS bug that affects WebKit (Safari and Google Chrome).  After some searching I found that several other people have had the problem, but I didn&#8217;t see a comprehensive writeup of the solution.  Here&#8217;s what I found&#8230;

Bug [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on slicing and CSS for a new theming project for Magento Commerce and was plagued with a CSS bug that affects WebKit (Safari and Google Chrome).  After some searching I found that several other people have had the problem, but I didn&#8217;t see a comprehensive writeup of the solution.  Here&#8217;s what I found&#8230;</p>
<p><span id="more-110"></span></p>
<p><strong>Bug description: </strong>When having a centered background image over a centered <code>&lt;div&gt;</code> (like a drop shadow over a main content <code>&lt;div&gt;</code>), the background image&#8217;s position would sometimes be &#8220;off&#8221; by 1px as the viewport in Safari, depending on the width of the viewport.  So half of possible viewport widths would show the incorrect version.  While 1px isn&#8217;t the end of the world, it can really hurt a design, and it&#8217;s nice to get center alignment in Safari/Chrome to work like Firefox/IE.</p>
<p>Example code:</p>
<pre>body {
    background: #f8f8f8 url(../images/dh_bg.jpg) 50% 0 repeat-y;
}
div#everything {
    width: 980px;
    margin: 0 auto;
}</pre>
<p><strong>Partial Solution: </strong>First of all, always use an even-width background image &#8211; this way the rest of the browsers will get it right automatically.</p>
<p>To fix Safari we can apply a CSS hack targeted towards WebKit.  If your background image&#8217;s width is just a little wider than your main <code>&lt;div&gt;</code>, then this will fix it:</p>
<pre>@media screen and (-webkit-min-device-pixel-ratio:0) {
    body {
        background-position: 49.999% 0;
    }
}</pre>
<p>The problem with this is that if the viewport is resized to be a little larger than your div, but not as large as your background image, then the 1px problem comes back.</p>
<p><strong>Real Solution:</strong><br />
So my solution is always use an even-width background image that is wider than the devices you want to support.  I made mine 5000px wide (which is still &lt; 1kb).  Then, the following CSS works great:</p>
<pre>@media screen and (-webkit-min-device-pixel-ratio:0) {
    body {
        background-position: 50.001% 0;
    }
}</pre>
<p>Hope that helps somebody.</p>
<p><em>Thanks to the helpful comments on <a href="http://robgoodlatte.com/2007/02/16/hacking-safari-rounding-bugs/comment-page-1/">Rob Goodlatte&#8217;s post</a> (a JavaScript solution), which helped point me in the right direction.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://philfreo.com/blog/fixing-safaris-1px-background-image-centering-problem/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CSS Tabs, BrowserCam, and Temporary Email Addresses</title>
		<link>http://philfreo.com/blog/css-navigation-tabs-for-k2-wordpress-theme/</link>
		<comments>http://philfreo.com/blog/css-navigation-tabs-for-k2-wordpress-theme/#comments</comments>
		<pubDate>Wed, 13 Dec 2006 00:01:47 +0000</pubDate>
		<dc:creator>Phil Freo</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.philfreo.com/blog/?p=25</guid>
		<description><![CDATA[After spending time today with frustrating IE6 CSS issues with borders on ul and li tags, I finished my CSS navigation tabs.  The CSS is based on the XHTML produced by the WordPress K2 theme, but can be easily matched for any site.

Here is the CSS:

ul.menu {
margin: 9px 9px 0 9px;
padding: 5px 0px 6px [...]]]></description>
			<content:encoded><![CDATA[<p>After spending time today with frustrating IE6 CSS issues with borders on <em>ul</em> and <em>li</em> tags, I finished my CSS navigation tabs.  The CSS is based on the XHTML produced by the WordPress <a href="http://www.getk2.com">K2</a> theme, but can be easily matched for any site.</p>
<p><a title="Photo Sharing" href="http://www.flickr.com/photos/philfreo/320829595/"><img width="354" height="75" alt="css for k2 theme tabs in wordpress" src="http://static.flickr.com/123/320829595_5b5eaf6025_o.jpg" /></a><span id="more-25"></span><br />
Here is the CSS:</p>
<p><code /></p>
<pre>ul.menu {
margin: 9px 9px 0 9px;
padding: 5px 0px 6px 10px;
border-bottom: 1px solid #afafaf;
}

ul.menu li {
margin: 0px;
list-style: none;
display: inline;
}

ul.menu li a {
margin: 0;
padding: 5px 12px 6px 12px;
border: 1px solid #afafaf;
background: #DDE;
font: normal 12pt Georgia, 'Times New Roman';
color: black;
text-decoration: none;
}

ul.menu li a:hover {
background: #333;
color: #eee;
text-decoration: none;
}

ul.menu li.current_page_item a,
ul.menu li.current_page_item a:hover {
border-top: 1px solid #afafaf;
border-bottom: 1px solid white;
background: white;
color: #333;
text-decoration: none;
}</pre>
<p><a href="http://www.browsercam.com/">BrowserCam</a> is an extremely useful (and quick) tool to easily see a screenshot of your websites in over 30 different OS/browser/version combinations.  It's incredibly handy instead of guessing whether it work in other browsers, or trying to install multiple versions of each browser.  It's free for 1 day for every email address you have...</p>
<p>On an unrelated note, <a href="http://www.10minutemail.com/10MinuteMail/index.html">10 Minute Mail</a>, <a href="http://www.2prong.com/">2 Prong</a>, and <a href="http://mailinator.com/mailinator/index.jsp">Mailinator</a> allow you to have an instant free temporary email address for those sites that require you confirm an email address but you know you don't need your real address.  Leave your browser window open until you get that "confirmation" email and then forget about it.</p>
<p>PS - If anyone has any advice as to how to easily paste CSS or other code and have WordPress preserve it's formatting (line breaks and spaces), let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://philfreo.com/blog/css-navigation-tabs-for-k2-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
