<?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>Winn.ws &#187; CSS</title>
	<atom:link href="http://winn.ws/archives/tag/css/feed" rel="self" type="application/rss+xml" />
	<link>http://winn.ws</link>
	<description>Standards-based design &#38; development</description>
	<lastBuildDate>Thu, 09 Sep 2010 14:05:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Jumping page content</title>
		<link>http://winn.ws/archives/360</link>
		<comments>http://winn.ws/archives/360#comments</comments>
		<pubDate>Fri, 14 May 2010 02:36:25 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.winn.ws/?p=360</guid>
		<description><![CDATA[You are likely aware of the page-centering technique of adding auto left and right margins to an outer div:

1
2
3
#some_div   &#123;
     margin: 0 auto;
&#125;

One of the issues of this is that when used on websites with multiple pages, the layout can appear to “jump” a little bit when going back [...]]]></description>
			<content:encoded><![CDATA[<p>You are likely aware of the page-centering technique of adding auto left and right margins to an outer div:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#some_div</span>   <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>One of the issues of this is that when used on websites with multiple pages, the layout can appear to “jump” a little bit when going back and forth between pages that require scroll bars and pages that do not. This is because the ~16px width of the scroll bar in the browser window causes the content area to become that much narrower and the wrap div re-centers itself in the narrower content area causing the jump.</p>
<p>One way to eliminate this jump is to force scroll bars onto every page regardless if they need them or not. This may annoy some purists out there, but I think it’s a decent solution.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">html    <span style="color: #00AA00;">&#123;</span>
     overflow-y<span style="color: #00AA00;">:</span><span style="color: #993333;">scroll</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>I just used this in a recent project and it checks out with all browsers including IE6.</p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/360/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Browser detection using jQuery</title>
		<link>http://winn.ws/archives/199</link>
		<comments>http://winn.ws/archives/199#comments</comments>
		<pubDate>Tue, 10 Feb 2009 17:31:05 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.winn.ws/?p=199</guid>
		<description><![CDATA[Browser sniffing is messy. There are a million ways to do it but none of them are particularly clean and most involve conditional statements such as &#8220;&#8221; for IE and various other CSS selector hacks for other browsers.
It get around this common issue i am now using jQuery to add a class to my body [...]]]></description>
			<content:encoded><![CDATA[<p>Browser sniffing is messy. There are a million ways to do it but none of them are particularly clean and most involve conditional statements such as &#8220;<!--[if condition]> HTML <![endif]-->&#8221; for IE and various other CSS selector hacks for other browsers.</p>
<p>It get around this common issue i am now using jQuery to add a class to my body tag.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>$.<span style="color: #660066;">browser</span>.<span style="color: #660066;">msie</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'browserIE'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #006600; font-style: italic;">// Add the version number</span>
        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'body'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'browserIE'</span> <span style="color: #339933;">+</span> $.<span style="color: #660066;">browser</span>.<span style="color: #660066;">version</span>.<span style="color: #660066;">substring</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>If the user is using IE it will add a class to teh body tag like so:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;browserIE browserIE#&quot;</span>&gt;</span></pre></td></tr></table></div>

<blockquote><p>The &#8220;#&#8221; stands for the version of IE the user is running.</p></blockquote>
<p>You can now access elements on your page that neeed to be corrected for IE by calling:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.browserIE6</span> <span style="color: #cc00cc;">#myDiv</span> <span style="color: #00AA00;">&#123;</span>
     <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">block</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>This will work much better then current hacks. Hope that helps someone!!</p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/199/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS 3 talk &#8211; Rounded corners</title>
		<link>http://winn.ws/archives/178</link>
		<comments>http://winn.ws/archives/178#comments</comments>
		<pubDate>Tue, 11 Nov 2008 04:50:13 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[Design & Layout]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.winn.ws/?p=178</guid>
		<description><![CDATA[So the last few years have brought amazing things, with the standards movement and getting companies to pay attention to the importance of following standards. In that time, I have seen over five big changes in PHP, three great changes in rails and only one in CSS. Why are we not seeing css3? Why does [...]]]></description>
			<content:encoded><![CDATA[<p>So the last few years have brought amazing things, with the standards movement and getting companies to pay attention to the importance of following standards. In that time, I have seen over five big changes in PHP, three great changes in rails and only one in CSS. Why are we not seeing css3? Why does IE 8 beta still barley work with CSS 2.1? Crazy!</p>
<p>Well, time for a CSS 3 trick! I will cover rounded corners! This is only supported by Firefox and Safari. Below you should see a box with rounded corners!</p>
<div style="-moz-border-radius: 5px;background-color: #333; -webkit-border-radius: 5px;border: 1px solid #fff; padding:0 6px;">
<p>This box has rounded corners!</p>
</div>
<blockquote><p>Here is the code:</p></blockquote>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div style=&quot;-moz-border-radius: 5px;
background-color: #333;
-webkit-border-radius: 5px;
border: 1px solid #fff;&quot;&gt;
&nbsp;
This box has rounded corners!&lt;/div&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/178/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web User Controls</title>
		<link>http://winn.ws/archives/173</link>
		<comments>http://winn.ws/archives/173#comments</comments>
		<pubDate>Fri, 24 Oct 2008 03:08:15 +0000</pubDate>
		<dc:creator>Greg Winn</dc:creator>
				<category><![CDATA[.NET 3.5 VB]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[VB]]></category>

		<guid isPermaLink="false">http://www.winn.ws/archives/173</guid>
		<description><![CDATA[Using the user controls may be one of the best moves you will make when developing an application in .NET. The user control will allow you to separate your reusable logic and keep it in one place. For many developers this is a great thing! Many of us have to re-create items over and over, [...]]]></description>
			<content:encoded><![CDATA[<p>Using the user controls may be one of the best moves you will make when developing an application in .NET. The user control will allow you to separate your reusable logic and keep it in one place. For many developers this is a great thing! Many of us have to re-create items over and over, after some time your code can look like crap and then you feel like crap because you have to deal with it.</p>
<p>Let’s say we have a site where I needed a “Quick Search” on every other page, but each page had a different look and feel or a different CSS document. All I would need to do is create a web user control “.ascx” file and lay down the basics of my quick search. Assign the div’s ID’s or classes, then include your control in each page that needs it. To style, just use your style sheet assigned to that page an add your styles.</p>
<p>Web controls make life a little easier when developing in .NET, so be sure to take advantage of this great tool and stop duplicating your work!</p>
]]></content:encoded>
			<wfw:commentRss>http://winn.ws/archives/173/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 4/10 queries in 0.003 seconds using memcached
Content Delivery Network via Amazon Web Services: CloudFront: dhbbuddo7esu2.cloudfront.net

Served from: winn.ws @ 2010-09-09 22:31:11 -->