<?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>Kasper Sørensen &#187; CSS</title>
	<atom:link href="http://www.kaspersorensen.com/blog/tags/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kaspersorensen.com</link>
	<description>Online Journalist, Blogger, Social Media Producer, Fly Fisher and full-time Geek</description>
	<lastBuildDate>Fri, 14 Jan 2011 21:48:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Speed up Your Design Process by Using Default CSS Rules</title>
		<link>http://www.kaspersorensen.com/blog/487/speed-up-your-design-process-by-using-default-css-rules/</link>
		<comments>http://www.kaspersorensen.com/blog/487/speed-up-your-design-process-by-using-default-css-rules/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 19:45:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.kaspersorensen.com/?p=487</guid>
		<description><![CDATA[If you know what you are doing, download the stylesheets (zip file), otherwise read on. All the web projects I work on need custom written CSS stylesheets. While some elements like classes and id&#8217;s might be the same most of them aren&#8217;t. I always design everything from scratch, I know some work of off templates [...]]]></description>
			<content:encoded><![CDATA[<p><strong>If you know what you are doing, <a href="http://www.kaspersorensen.com/files/files/default-css.zip">download the stylesheets</a> (zip file), otherwise read on.</strong></p>
<p>All the web projects I work on need custom written CSS stylesheets. While  some elements like classes and id&#8217;s might be the same most of them aren&#8217;t. I  always design everything from scratch, I know some work of off templates but I  feel it limits the creative process and encourage cutting corners. You want  every design/client to be as unique as possible, but some things can be automated.</p>
<p>I use <a href="http://wordpress.org/">WordPress</a> for most of my web design work, and I’m about to give you a reason for doing  that as well ;) if you don’t already.</p>
<p>I use two pre written stylesheets in almost all projects. I use the  <a href="http://meyerweb.com/eric/tools/css/reset/">reset-styles.css</a> written by <a href="http://meyerweb.com/">Eric Meyer</a>, and my own content stylesheet.</p>
<h2>Resetting Browser Styles</h2>
<p>Most if not every imaginable browser on the market apply its own set default  styles to every web page they feed to the user. This means that if you don’t  define certain styles like margins and line-height, then the browser will  define them for you. As every browser defines these styles differently, you  will not get any consistency unless you define them yourself. By using Mr.  Meyers stylesheet you ensure that you reset all browser styles to zero. This does  two things for you:</p>
<ol>
<li>It gives you consistency across browsers.</li>
<li>It ensures that  you don’t forget to define the styles that will screw up your precious design.</li>
</ol>
<div id="attachment_496" class="wp-caption aligncenter" style="width: 510px"><strong><img class="size-full wp-image-496" title="Make your stylesheets cross browser compatible" src="http://www.kaspersorensen.com/files/2009/01/css_res_con_browsers.jpg" alt="Reset your stylesheets to improve browser compatibility" width="500" height="350" /></strong><p class="wp-caption-text">Reset your stylesheets to improve browser compatibility</p></div>
<p>Just <a href="http://meyerweb.com/eric/tools/css/reset/reset.css">download the stylesheet</a> and put it in the same folder as your main  stylesheet and use the <a href="http://www.w3.org/TR/CSS2/cascade.html#at-import"><code>@import command</code></a> to apply them to your design.</p>
<h2>Custom WordPress Post Styles</h2>
<p>Now that you have reset all your styles you will want to define them. I like  to think of this as applying my own default stylesheet to all browsers. If you  don’t define any styles all you headers (h1, h2, h3 etc.) will all look the  same, your list (ul, ol) will look like plain text.</p>
<h3>The Solution</h3>
<p>There are certain content styles that won’t deviate much from one design to the  design. For the web, you mostly use a line-height of 1½ or 2 times the font  size. You list items will have slightly more ‘air’ between them and they will be  slightly indented. Your headers will decrease in size from <code>&lt;h1&gt;</code> through  to <code>&lt;h6&gt;</code>. I have created a stylesheet that assigns a default value to all  these elements so you don’t have to do it every time.</p>
<p>WordPress generate a lot of styles on the fly that makes it easy to make  this consistent over many designs. One of the things that I have found useful  is to style all my images according the align property assigned by WordPress. When  you insert an image in your post, you choose how you want to align it, and  WordPress will automatically give the <code>&lt;img&gt;</code> an appropriate class. You  also have the ability to use captions from within the image editor, this will  also trigger WordPress to assign a certain class to the image. These styles are  consistent across all WP sites, so why not apply you own values to these as  well. Remember, we are only concerned with content styles that will be the same  on the majority of designs.</p>
<p>Some of the styles in the css file include consistent styling for images  aligned left, right or centred. It ensures that the image captions will show up  nicely no matter how your layout varies. Blockquotes will be slightly indented with  a background image and a background colour. All the list and paragraphs will  have defined line-heights, margins and padding.</p>
<h2>Right, Show me the Meat!</h2>
<p>This save a tremendous amount of time and the values are consistent across  most designs. You can easily go in and edit the content stylesheet to suit your  needs. The colours used in the document are all listed at the top, so it’s just  a matter of using the find/replace command if you want to change all of them at  once.</p>
<h3>Download</h3>
<p>Go grab the <a href="http://www.kaspersorensen.com/files/files/default-css.zip">zip file</a> or have a look at the <a href="http://www.kaspersorensen.com/files/files/css-demo/">demo page</a>.</p>
<p>The zip file includes all the files and images you need. Just leave the folder hierachy intact and you are good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaspersorensen.com/blog/487/speed-up-your-design-process-by-using-default-css-rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

