<?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>Poiesis Web Development &#187; FireFox</title>
	<atom:link href="http://www.poiesis.co.za/index.php/tag/firefox/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.poiesis.co.za</link>
	<description>Becasue IT matters</description>
	<lastBuildDate>Mon, 14 Jun 2010 12:33:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS Stylesheets</title>
		<link>http://www.poiesis.co.za/index.php/2009/05/css-stylesheets/</link>
		<comments>http://www.poiesis.co.za/index.php/2009/05/css-stylesheets/#comments</comments>
		<pubDate>Wed, 27 May 2009 23:19:23 +0000</pubDate>
		<dc:creator>Brent</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[browser support]]></category>
		<category><![CDATA[FireFox]]></category>
		<category><![CDATA[Google Chrome]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.poiesis.co.za/?p=49</guid>
		<description><![CDATA[A cascading style sheet or CSS allows you to separate the presentation and content of your web sites, with your content contained in your (X)HTML files and your presentation defined in a CSS. The CSS can be an internal stylesheet defined in the head element of your html file, an external file referenced in the [...]]]></description>
			<content:encoded><![CDATA[<p>A cascading style sheet or CSS allows you to separate the presentation and content of your web sites, with your content contained in your (X)HTML files and your presentation defined in a CSS. The CSS can be an internal stylesheet defined in the <code>head</code> element of your html file, an external file referenced in the <code>head</code> element, or an inline style defined in an html element.</p>
<h3>The Internal Stylesheet</h3>
<p>If you use a CSS style in the <code>header</code> element you need to enclose it in a <code>style</code> element, as in:</p>
<p><code>&lt;head&gt;</code><br />
<code>&lt;title&gt;<em>Your Page Title</em>&lt;title&gt;</code><br />
<code>&lt;style type="text/css"&gt;</code><br />
<code style="margin-left:10px;"><em>CSS Content</em></code><br />
<code>&lt;/style&gt;</code><br />
<code>&lt;/head&gt;</code></p>
<p><span id="more-49"></span>The CSS styles defined in the <code>head</code> element will be applied only to that page, which means you need to define CSS styles for each page, and you need to update each page when you change your design.</p>
<h3>The External Stylesheet</h3>
<p>An external CSS stylesheet exists in a separate <em>.css</em> file and is referenced by a <code>link</code> in the <code>header</code> element, as in:</p>
<p><code>&lt;head&gt;</code><br />
<code>&lt;title&gt;Your Page Title&lt;title&gt;</code><br />
<code>&lt;link rel="stylesheet" type="text/css" href="<em>path to stylesheet.css</em>" &gt;</code><br />
<code>&lt;/head&gt;</code></p>
<p>or it can be imported into the page in the <code>header</code> element, as in:</p>
<p><code>&lt;head&gt;</code><br />
<code>&lt;title&gt;Your Page Title&lt;title&gt;</code><br />
<code>&lt;style type="text/css"&gt;@import url(<em>path to stylesheet.css</em>)&lt;/style&gt;</code><br />
<code>&lt;/head&gt;</code></p>
<p>The external CSS stylesheet can also reference other external stylesheets by simply using <code>@import "<em>path to stylesheet.css</em>"</code>. The styles from the imported stylesheet will be inserted where the <code>@import "<em>path to stylesheet.css</em>"</code> line is located. This is important to remember as subsequent styles that use the same <strong>selector</strong> name or the same <strong>class</strong> name will override previously declared styles.</p>
<p>The major advantage of having an external .<em>css</em> stylesheet lies in the fact that you only need to make changes to the external CSS stylesheet when you change your web site design and those changes will be implemented on all pages that reference the external stylesheet. This improves web site maintenance and flexibility, while reducing <code>html</code> file size and reducing bandwith usage.</p>
<h3>Inline Styles</h3>
<p>Finally, inline styles are placed directly in the element that you want to style using the CSS syntax <code><em>property</em></code>: <code><em>value</em></code>. For example, <code>&lt;div style="background-color: red;"&lt; will give the div a red background color. This defeats the purpose of CSS and makes the maintenance of a web site more complicated.</p>
<h3>Cascading Stylesheets</h3>
<p>It is possible to use all three type of CSS stylesheets on one page, and you can reference more than one stylesheet in your <code>head</code> element. In this event the various CSS styles and stylesheets will cascade into one, with the styles in CSS stylesheet that is loaded last overriding the styles is CSS stylesheet that were loaded first. As the content of an <code>html</code> file, and the content of a .<em>css</em> file, is read and loaded sequentially from top to bottom, inline styles will override CSS stylesheets defined or linked in the <code>head</code> element; and if the reference to the external CSS stylesheet in the <code>head</code> element is placed below the internal stylesheet, the external stylesheet will override the internal style sheet. But this only applies to duplicate styles.</p>
<h3>Browser Support</h3>
<p>One major disadvantage of using CSS stylesheets is the varying support that the different browsers offer. Currently, the major browsers are Internet Explorer 6, Internet Explorer 7, Internet Explorer 8, Mozilla Firefox 2, Mozilla Firefox 3, Safari, Google Chrome, Opera 9.6 and Opera 10. Testing your web site design and layout against all these browsers can become tedious! More on browser quirks later.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.poiesis.co.za/index.php/2009/05/css-stylesheets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
