<?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>Pixelhaven Web Design &#124; A Cincinnati Web Design Company &#187; style sheets</title>
	<atom:link href="http://www.pixelhavenllc.com/tag/style-sheets/feed" rel="self" type="application/rss+xml" />
	<link>http://www.pixelhavenllc.com</link>
	<description>Passionate about creating attractive, simple and structurally clean web sites</description>
	<lastBuildDate>Mon, 23 Jan 2012 22:35:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Quick Tip: Using Conditional Comments And CSS</title>
		<link>http://www.pixelhavenllc.com/quick-tip-using-conditional-comments-and-css</link>
		<comments>http://www.pixelhavenllc.com/quick-tip-using-conditional-comments-and-css#comments</comments>
		<pubDate>Thu, 17 Jul 2008 11:00:41 +0000</pubDate>
		<dc:creator>Josh Harbaugh</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Quick Fixes]]></category>
		<category><![CDATA[quick tip]]></category>
		<category><![CDATA[style sheets]]></category>

		<guid isPermaLink="false">http://www.pixelhavenllc.com/?p=37</guid>
		<description><![CDATA[I often find myself trying to get Internet Explorer's various versions to behave correctly in my websites. Unfortunately, Internet Explorer isn't the sort of browser you can just ignore and hope those users upgrade to something more standards complaint. So, what do you do?</p><p><a href="http://www.pixelhavenllc.com/quick-tip-using-conditional-comments-and-css">Continue reading <span class="meta-nav">&#8594;</span></a></p>]]></description>
			<content:encoded><![CDATA[<p>I often find myself trying to get Internet Explorer&#8217;s various versions to behave correctly in my websites. Unfortunately, Internet Explorer isn&#8217;t the sort of browser you can just ignore and hope those users upgrade to something more standards complaint, like <a href="http://www.getfirefox.com">Firefox</a> or <a href="http://www.opera.com/">Opera</a>. So, what&#8217;s the easiest way to make sure users on Internet Explorer see your site as intended?</p>
<p>I&#8217;ve found that using <strong>conditional comments</strong> with <strong>separate style sheets</strong> works the best for me. Sure, it&#8217;s a rough-and-tumble solution to be sure, but it works when I&#8217;m in a crunch and I need to get a project done. And really, it&#8217;s not that bad of a method to use which, I imagine, is one of the reasons for the <a href="http://alistapart.com/articles/minorthreat">version targeting in the upcoming Internet Explorer releases</a>.</p>
<p><strong>How do you use conditional comments with separate style sheets?</strong></p>
<p>Well, I&#8217;ll show you. Let&#8217;s say you&#8217;ve noticed some display issues with a new CSS-based design in Internet Explorer. No surprise there, right? You isolated the problem and created a hack to get it working in IE, but you&#8217;d rather not clutter up your default style sheet with all this mucked-up styling, so you create a separate style sheet to house these changes. <em>An added benefit of this method is that you can overwrite default style sheets with these new styles to make Internet Explorer behave.</em> Here&#8217;s how.</p>
<p><strong>Setup your style sheet link as normal.</strong></p>
<pre class="html" name="code">
&lt;html>
   &lt;head>
   &lt;title>Wicked awesome page title&lt;/title>
   &lt;link rel="stylesheet" href="/stylesheets/default.css" type="text/css" />
   &lt;/head>
   &lt;body>
      &lt;p>Some information ...&lt;/p>
   &lt;/body>
&lt;/html>
</pre>
<p><strong>Then, add the conditional comment for Internet Explorer 6.0</strong></p>
<pre class="html" name="code">
&lt;html>
   &lt;head>
   &lt;title>Wicked awesome page title&lt;/title>
   &lt;link rel="stylesheet" href="/stylesheets/default.css" type="text/css" />
   &lt;!--[if IE 6]>
   &lt;link rel="stylesheet" href="/stylesheets/ie6.css" type="text/css" />
   &lt;![endif]-->
   &lt;/head>
   &lt;body>
      &lt;p>Some information ...&lt;/p>
   &lt;/body>
&lt;/html>
</pre>
<p>And presto! You&#8217;ve got a style sheet that will only get used in Internet Explorer 6.0. What about all the other versions? The 7th version of Internet Explorer helped to improve the browsers understanding of CSS and web standards, so some of the same old issues with Internet Explorer don&#8217;t really come up. What if you wanted to load a style sheet that worked for all versions lower than 7?</p>
<p><strong>For that you&#8217;d do something like this:</strong></p>
<pre class="html" name="code">
&lt;html>
   &lt;head>
   &lt;title>Wicked awesome page title&lt;/title>
   &lt;link rel="stylesheet" href="/stylesheets/default.css" type="text/css" />
   &lt;!--[if lt IE 7]>
   &lt;link rel="stylesheet" href="/stylesheets/ie6.css" type="text/css" />
   &lt;![endif]-->
   &lt;/head>
   &lt;body>
      &lt;p>Some information ...&lt;/p>
   &lt;/body>
&lt;/html>
</pre>
<p>The &#8216;lt&#8217; just means &#8220;less than&#8221;, and will target any versions less than 7, and load up the style sheet accordingly. Additional syntax are: &#8216;gt&#8217; for &#8220;greater than&#8221; and &#8216;gte&#8217; / &#8216;lte&#8217; for &#8220;greater / less than or equal to&#8221;. This trick can apply to anything you want to show in Internet Explorer but not other browsers, such as, messages explaining to users that they are using a version of Internet Explorer that may not be suited well for the website they are currently viewing and may notice some display issues.</p>
<p>I&#8217;d use the conditional comment sparingly, but if you&#8217;re in a deadline situation and don&#8217;t have time to find a legitimate CSS fix for the problem, I&#8217;m all for using this trick to get the job done.<br />
<a name="conditionalcomments"></a><br />
By the way, you can also use this technique to hide/show content from a particular Internet Explorer version. Perhaps a <em>&#8220;You are currently using Internet Explorer 6. Though not necessary to use this website, if you&#8217;d like to upgrade your browser we&#8217;d be able to enhance your experience while you&#8217;re here.&#8221;</em> message for IE6 users?  </p>
<p>UPDATE: As a side note, if you use conditional comments in your markup it will still validate. Conditional comments are actually valid markup, so don&#8217;t worry if you like to make sure all your code validates.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelhavenllc.com/quick-tip-using-conditional-comments-and-css/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Style sheets &#8211; The Basics</title>
		<link>http://www.pixelhavenllc.com/style-sheets-the-basics</link>
		<comments>http://www.pixelhavenllc.com/style-sheets-the-basics#comments</comments>
		<pubDate>Mon, 16 Jun 2008 12:30:50 +0000</pubDate>
		<dc:creator>Josh Harbaugh</dc:creator>
				<category><![CDATA[Journal]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[style sheets]]></category>

		<guid isPermaLink="false">http://www.pixelhavenllc.com/?p=28</guid>
		<description><![CDATA[Style sheets let you separate content from the look and feel of a site, so that you can easily change each independently of the other. A very useful tool to have in your web design arsenal.</p><p><a href="http://www.pixelhavenllc.com/style-sheets-the-basics">Continue reading <span class="meta-nav">&#8594;</span></a></p>]]></description>
			<content:encoded><![CDATA[<p>On every site, from personal e-commerce to blogs, style sheets can simplify changes, and make pages more accessible.</p>
<h3>Page-by-page updates of a site design — including layout, colors, and fonts — is a time-consuming and error-prone process.</h3>
<p><span id="more-28"></span></p>
<p>As customers visit your website, you can learn something about what they like and what they don&#8217;t like in terms of content and look and feel. You can also learn what works and what doesn&#8217;t work in terms of navigation. You might glean this feedback from informal conversations with customers, from server logs indicating that people don&#8217;t click on certain links, or from more formal usability and market research. But once you have some information about what could be improved, fixing it on your site can be daunting unless you&#8217;ve planned ahead.</p>
<p>If you&#8217;ve got design problems to fix on all your pages, it will be hard to justify the changes if you have to edit every single page. It takes time to open, edit, and save every file back to the server; then test every file, and possible open and edit it again if there continues to be problems.</p>
<p>You can avoid the problem of mixed content and presentation and make it easy to modify the presentation of all of your web pages by using <strong>cascading style sheets (CSS)</strong>. Although it&#8217;s not difficult to make changes to HTML pages without CSS, it will often become problematic if you need to change whole sections of a page or several pages at once.</p>
<h3>CSS offers a way of separating presentation from content</h3>
<p>With CSS, you specify all of your content in the standard HTML files, and specify how that content should be presented in a CSS file.</p>
<p>Below is an example of what I mean.</p>
<p><strong>HTML:</strong><br />
<code><html><br />
<head></p>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
</head></p>
<h2>Example heading</h2>
<p>Some content would go here.</p>
<p></html></code></p>
<p>Only the content is specified in this HTML file. All the style information is contained in a separate style sheet (style.css).</p>
<p><strong>CSS (style.css):</strong><br />
<code>h2 {<br />
     text-align: left;<br />
     color: #333;<br />
     font-family: Georgia, "Times New Roman", serif;<br />
     font-style: italic;<br />
     font-size: 18px;<br />
}<br />
p {<br />
     text-align: left;<br />
     color: #777;<br />
     font-family: Verdana, Arial, sans-serif;<br />
     font-style: normal;<br />
     font-size: 11px;<br />
}</code></p>
<p>With a CSS file like this it would be possible to make whole sitewide changes to the style of the <code><br />
<h2></code> and <code>
<p></code> tags on <strong>every page of the site</strong> with the update of only one file.</p>
<h3>Define a standard style sheet as part of your sitewide page template</h3>
<p>Style sheets can be used as part of your page templates to <strong>create flexible and attractive web pages</strong>. You might define one default style sheet that all of your pages will use — one that defines the basic look and feel or your site.</p>
<p>Things that can benefit from the use of style sheets include<br />
<strong>Flexible grid layouts<br />
Navigation bars<br />
Tab rows<br />
And text links</strong></p>
<h3>Define a separate style sheet for printable pages</h3>
<p>It is a good idea to have a separate style sheet for creating printable pages. This style sheet can be a much simpler version of your page template style sheet because printed web pages will not display navigation elements such as tabs and navigation bars, extra content modules, such as the sidebar or external links, or advertising.</p>
<p>To establish a specific print style sheet you&#8217;ll need to define the following just below the default style sheet in the HTML file.</p>
<p><code>
<link rel="stylesheet" href="print.css" type="text/css" media="print" /></code></p>
<p>This will ensure that the printing functions will use the styles defined in the print.css file instead of the default style sheet. The technique can be very useful when creating &#8216;newspaper&#8217; style articles that you intend for your visitors to print for future reference.</p>
<h3>What about a mobile style sheet? You can do that too.</h3>
<p>If you intend on having your content viewable by mobile phone users, then it&#8217;s a good idea to setup a separate mobile style sheet for them. This ensures that your content and web site represent the best possible image they can to your viewers. Someone would hate to navigate to your site only to find out that you haven&#8217;t taken the time to design an experience around the way they like to browse your site. It might make them feel like they are less important. This is just not the case anymore with more and more users beginning to really use their smart phones for things like browsing news sites and even purchasing products online. Sites like Amazon and Google have jumped on this trend and it can only be assumed that more and more companies will join in.</p>
<p>Here&#8217;s an example of how you might define a mobile style sheet:<br />
<code>
<link rel="stylesheet" href="mobile.css" type="text/css" media="handheld" /></code></p>
<p>For more information about creating mobile CSS, go to <a href="http://www.w3.org/TR/css-mobile/">w3.org/TR/css-mobile</a><br />
A List Apart is also a great resource for <a href="http://alistapart.com/topics/code/css/">articles on the topic of CSS</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixelhavenllc.com/style-sheets-the-basics/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

