<?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>Pario TechnoBlob &#187; CSS</title>
	<atom:link href="http://pario.no/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://pario.no</link>
	<description>A cronological documentation test project, nothing serious, really!</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:17: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>Premailer: preflight for HTML e-mail</title>
		<link>http://pario.no/2007/10/23/premailer-preflight-for-html-e-mail/</link>
		<comments>http://pario.no/2007/10/23/premailer-preflight-for-html-e-mail/#comments</comments>
		<pubDate>Tue, 23 Oct 2007 08:20:28 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://pario.no/2007/10/23/premailer-preflight-for-html-e-mail/</guid>
		<description><![CDATA[Premailer is a script accessible from the web that turns external CSS webpage into inline, improving the rendering of HTML e-mail. This makes it possible to make a webpage and then run it througt this script to make a HTML e-mail.]]></description>
			<content:encoded><![CDATA[<p><a href="http://code.dunae.ca/premailer.web/" target="_blank">Premailer</a> is a script accessible from the web that turns external <abbr>CSS</abbr> webpage into inline, improving the rendering of <abbr>HTML</abbr> e-mail.</p>
<p>This makes it possible to make a webpage and then run it througt this script to make a HTML e-mail.</p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/code.dunae.ca\/premailer.web\/"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMTAvMjMvcHJlbWFpbGVyLXByZWZsaWdodC1mb3ItaHRtbC1lLW1haWwvPHdwdGI%2BUHJlbWFpbGVyOiBwcmVmbGlnaHQgZm9yIEhUTUwgZS1tYWlsPHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/10/23/premailer-preflight-for-html-e-mail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Left and Right align text on the same line</title>
		<link>http://pario.no/2007/10/05/left-and-right-align-text-on-the-same-line/</link>
		<comments>http://pario.no/2007/10/05/left-and-right-align-text-on-the-same-line/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 10:21:55 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://pario.no/2007/10/05/left-and-right-align-text-on-the-same-line/</guid>
		<description><![CDATA[It can sometimes be useful to have some text be aligned to the left and some text be aligned to the right on the same line, eg in a footer. Here is how this can be done in HTML: &#60;div id="footer"&#62; &#60;p class="leftalign"&#62;Text on the left.&#60;/p&#62; &#60;p class="rightalign"&#62;Text on the right.&#60;/p&#62; &#60;/div&#62; If you were [...]]]></description>
			<content:encoded><![CDATA[<p>It can sometimes be useful to have some text be aligned to the left and some text be aligned to the right on the same line, eg in a footer.</p>
<p>Here is how this can be done in HTML:</p>
<pre>&lt;div id="footer"&gt;
  &lt;p class="leftalign"&gt;Text on the left.&lt;/p&gt;
  &lt;p class="rightalign"&gt;Text on the right.&lt;/p&gt;
&lt;/div&gt;</pre>
<p>If you were to then give your CSS classes leftalign and rightalign values of text-align: left; and text-align: right; respectively, you would get close to your desired result, but your right-aligned text would be bumped down one line because of the new paragraph. Instead, just float your paragraphs:</p>
<p><code> </code></p>
<pre>.leftalign {
float: left;
}
.rightalign {
float: right;
}</pre>
<p>Then just remember to clear your float:</p>
<p><code> </code></p>
<pre>&lt;div style="clear: both;"&gt;&lt;/div&gt;</pre>
<script type="text/javascript">var wordpress_toolbar_urls = [];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMTAvMDUvbGVmdC1hbmQtcmlnaHQtYWxpZ24tdGV4dC1vbi10aGUtc2FtZS1saW5lLzx3cHRiPkxlZnQgYW5kIFJpZ2h0IGFsaWduIHRleHQgb24gdGhlIHNhbWUgbGluZTx3cHRiPmh0dHA6Ly9wYXJpby5ubzx3cHRiPlBhcmlvIFRlY2hub0Jsb2I%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/10/05/left-and-right-align-text-on-the-same-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using multiple CSS classes</title>
		<link>http://pario.no/2007/10/05/using-multiple-css-classes/</link>
		<comments>http://pario.no/2007/10/05/using-multiple-css-classes/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 08:01:19 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://pario.no/2007/10/05/using-multiple-css-classes/</guid>
		<description><![CDATA[Let’s say you need six different 100px square boxes with different characteristics: Red with Border Blue with Border Green with Border Red without Border Blue without Border Green without Border You COULD create a unique class for each of these: .redwithborder { width: 100px; height: 100px; margin: 10px; float: left; background-color: red; border: 3px solid [...]]]></description>
			<content:encoded><![CDATA[<p>Let’s say you need six different 100px square boxes with different characteristics:</p>
<ul>
<li>Red with Border</li>
<li>Blue with Border</li>
<li>Green with Border</li>
<li>Red without Border</li>
<li>Blue without Border</li>
<li>Green without Border</li>
</ul>
<p>You COULD create a unique class for each of these:</p>
<pre>.redwithborder {
 width: 100px;
 height: 100px;
 margin: 10px;
 float: left;
 background-color: red;
 border: 3px solid black;
}

.bluewithborder {
 width: 100px;
 height: 100px;
 margin: 10px;
 float: left;
 background-color: blue;
 border: 3px solid black;
}

...etc</pre>
<p>BUT that’s called CSS Bloat because it includes a bunch of unnecessary repetitive code. Instead, create just five classes with simple, identifiable names that each handle something very specific:</p>
<pre>.box {
 width: 100px;
 height: 100px;
 margin: 10px;
 float: left;
}

.red {
 background-color: red;
}

.blue {
 background-color: blue;
}

.green {
 background-color: green;
}

.border {
 border: 3px solid black;
}</pre>
<p>In your HTML, things look just as clean, just put a space between each of the classes you wish to apply to the div:</p>
<pre>&lt;div class="red border box"&gt;&lt;/div&gt;
&lt;div class="blue border box"&gt;&lt;/div&gt;
&lt;div class="green border box"&gt;&lt;/div&gt;
&lt;div class="red box"&gt;&lt;/div&gt;
&lt;div class="blue box"&gt;&lt;/div&gt;
&lt;div class="green box"&gt;&lt;/div&gt;</pre>
<p>This method allows better future flexibility as well. If you wanted to create an orange box, or even a box with a background-image or some completely separate characteristic, you could. And then adding a border to that new box is simple adding a space and the “border” class name.</p>
<p>Source: <a href="http://css-tricks.com/un-bloat-css-by-using-multiple-classes/">http://css-tricks.com/un-bloat-css-by-using-multiple-classes/</a></p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/css-tricks.com\/un-bloat-css-by-using-multiple-classes\/"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMTAvMDUvdXNpbmctbXVsdGlwbGUtY3NzLWNsYXNzZXMvPHdwdGI%2BVXNpbmcgbXVsdGlwbGUgQ1NTIGNsYXNzZXM8d3B0Yj5odHRwOi8vcGFyaW8ubm88d3B0Yj5QYXJpbyBUZWNobm9CbG9i";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/10/05/using-multiple-css-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Shorthand Guide</title>
		<link>http://pario.no/2007/08/10/css-shorthand-guide/</link>
		<comments>http://pario.no/2007/08/10/css-shorthand-guide/#comments</comments>
		<pubDate>Fri, 10 Aug 2007 22:59:26 +0000</pubDate>
		<dc:creator>Hans-Henry Jakobsen</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://hhj.no/wordpress/2007/08/10/css-shorthand-guide/</guid>
		<description><![CDATA[Ok. Let’s set the record straight. There is no official guide for each and every CSS shorthand property value. So let’s work together and put one together shall we? Ok. Straight to the business. Anytime I’ve ran into a specification (besides the confusing mess at the W3C), it turns into showing off a couple of [...]]]></description>
			<content:encoded><![CDATA[<p>Ok. Let’s set the record straight. There is no official guide for each and every CSS shorthand property value. So let’s work together and put one together shall we? Ok. Straight to the business. Anytime I’ve ran into a specification (besides the confusing mess at the W3C), it turns into showing off a couple of examples and you’re supposed to be set on your way. Well well. Over the years, I’ve found quite some interesting unknown quirky facts about these shorthands… hence this Guide was born.<br />
<span id="more-266"></span></p>
<h3>Background</h3>
<p>Backgrounds can be tricky. Nevertheless, effective when condensed correctly. The syntax for declaring the background shorthand values are as follows:</p>
<h3>background properties</h3>
<pre>element {
  background-color: color || #hex || (rgb / % || 0-255);
  background-image:url(URI);
  background-repeat: repeat || repeat-x || repeat-y || no-repeat;
  background-position: X Y || (top||bottom||center) (left||right||center);
  background-attachment: scroll || fixed;
}</pre>
<p>Believe it or not, all these properties can be combined into one single <strong>background</strong> property as follows:</p>
<h3>the background shorthand property</h3>
<pre>element {
  background:
    #fff
    url(image.png)
    no-repeat
    20px 100px
    fixed;
}</pre>
<h3>The Unknown</h3>
<p>Often times developers find themselves wondering <q>What if I leave out this value or that one? How will that effect the design?</q>. Good questions.</p>
<p>By default, the background property will assume the following when you <strong>do not</strong> declare each value of the properties.</p>
<h3>default background property values</h3>
<pre>
element {
  background-color: transparent;
  background-image: none;
  background-repeat: repeat;
  background-position: top left;
  background-attachment: scroll;
}</pre>
<p><strong>Lesson learned: </strong><em>be careful on what you don’t declare. By chosing to not declare a value on a shorthand property, you are explicitly declaring the above default settings.</em> For example, let’s look at the following example.</p>
<h3>background shorthand example (unexplicit)</h3>
<pre>element {
  background:red url(image.png);
}</pre>
<p>This would be the same as declaring the following values:</p>
<h3>background shorthand example (explicit)</h3>
<pre>element {
  background:red url(image.png) repeat top left scroll;
}</pre>
<h3>Font</h3>
<p>Font is perhaps the trickiest. However, it follows the same rules as the background shorthand property. <em>All that you do not declare will have unexplicit values</em>. Here is the font shorthand specification:</p>
<h3>font properties</h3>
<pre>element {
  font-style: normal || italic || oblique;
  font-variant:normal || small-caps;
  font-weight: normal || bold || bolder || || lighter || (100-900);
  font-size: (number+unit) || (xx-small - xx-large);
  line-height: normal || (number+unit);
  font-family:name,"more names";
}</pre>
<p>The default values for the font shorthand property are as follows:</p>
<h3>default font property values</h3>
<pre>element {
  font-style: normal;
  font-variant:normal;
  font-weight: normal;
  font-size: inherit;
  line-height: normal;
  font-family:inherit;
}</pre>
<p>And of course without any further ado. The font shorthand property syntax:</p>
<h3>the font shorthand property</h3>
<pre>element {
  font:
    normal
    normal
    normal
    inhert/
    normal
    inherit;
}</pre>
<p>Here is where it gets tricky. The fact that <em>font-style</em>, <em>font-variant</em>, and <em>font-weight</em> all come “normal” out of the box, you may need to pay a little more close attention when you’re styling elements that come with default browser styles like &lt;h1&gt; &#8211; &lt;h6&gt; or &lt;strong&gt; and &lt;em&gt;. For example, styling the strong element:</p>
<h3>strong element styled with font</h3>
<pre>strong {
  font:12px verdana;
}</pre>
<p>By writing the above into your style sheet, you will be unexplicitly removing the <strong>font-weight:bold</strong> default browser style that is applied to strong elements.</p>
<p>Last but not least (for -font- that is), a real world example:</p>
<h3>font shorthand property example (unexplicit)</h3>
<pre>p {
  font:bold 1em/1.2em georgia,"times new roman",serif;
}</pre>
<p>This would be the same as declaring the following properties:</p>
<h3>the font shorthand property (explicit)</h3>
<pre>p {
  font-style:normal;
  font-variant:normal;
  font-weight:bold;
  font-size:1em;
  line-height:1.2em;
  font-family:georgia,"times new roman",serif;
}</pre>
<h3>Border</h3>
<p>Let’s not waste time discussing the warnings. The same rules apply from here on out. This is all you need to know</p>
<h3>border properties</h3>
<pre>element {
  border-width: number+unit;
  border-style: (numerous);
  border-color: color || #hex || (rgb / % || 0-255);
}</pre>
<p>becomes this:</p>
<h3>the border shorthand propertie</h3>
<pre>element {
  border:
    4px
    groove
    linen
}</pre>
<p>Don’t ask me how that would look. The fact that “linen” is in there, things could get scary. Nevermind the matter, here is where ‘border’ gets funny.</p>
<h3>border examples</h3>
<pre>p {
  border:solid blue;
}
/* will create a '3px' solid blue border...
   who knows where 3px came from?? */

p {
  border:5px solid;
}
/* will create 5px solid 'black' border...
    default must be black?? */

p {
  border:dashed;
}
/* will create a '3px' dashed 'black' border...
    3px black lines unite! */

p { border:10px red; }
p { border:10px; }
p { border:red; }
/* these just don't even work */</pre>
<p>One thing to specially take note about declaring a border without a color, the default will be ‘black’ unless otherwise noted through an explicit or inherited ‘color’ property. See the following examples:</p>
<h3>border color examples</h3>
<pre>
p {
  border:dotted;
  color:red;
}
/* will create a 3px dotted red border */
/* ----------------------------- */
body {
  color:blue;
}
body p {
  border:5px solid;
}
/* will create a 5px solid blue border */
/* ----------------------------- */</pre>
<p>Get it? Got it. Good! (isn’t that a song?) Anyway. On with this</p>
<h3>Margin and Padding</h3>
<p>These are by far the easiest. Just think about the hands of a clock starting at noon, and follow the hour. For the sake of brevity, we’ll be working with margin (since it’s a shorter word). So for all cases of margin, the same rules apply to padding.</p>
<h3>margin properties.</h3>
<pre>element {
  margin-top: number+unit;
  margin-right: number+unit;
  margin-bottom: number+unit;
  margin-left: number+unit;
}</pre>
<p>… combined into the margin superpowers:</p>
<h3>the margin shorthand property</h3>
<pre>/* top right bottom left */
element {
  margin: auto auto auto auto;
}</pre>
<p>Of course, you may declare your margin with one, two, three, or four values. Here is how each scenario will be played out:</p>
<h3>margin fun</h3>
<pre>/* adds a 10px margin to all four sides */
element {
  margin:10px;
}

/* adds a 20px margin to top and bottom
    and a 5px margin to left and right */
element {
  margin:20px 5px;
}

/* adds a 50px margin to top
    and a 10px margin to left and right
    and a 300px margin to bottom */
element {
  margin:50px 10px 300px;
}</pre>
<p>Understood? Let’s keep going. This is fun isn’t it! (whatever, you like it).</p>
<h3>Outline</h3>
<p>Quite frankly, this property has dropped off the existence of the design radar. Mainly because of lack of browsers supporting this CSS 2.1 standard (yep, it’s an actual property), but nonetheless, it too has a shorthand property. This property follows the exact same (or same exact &#8211; they mean the same thing) specification as the ‘border’ shorthand property. But, for purposes of this being a Guide, it must be here. So:</p>
<h3>outline properties</h3>
<pre>element {
  outline-width: number+unit;
  outline-style: (numerous);
  outline-color: color || #hex || (rgb / % || 0-255);
}</pre>
<p>Outline written as shorthand:</p>
<h3>outline shorthand property</h3>
<pre>element {
  outline:3px dotted gray;
}</pre>
<p>For purposes of trying to keep things from repeating, please see the <a href="http://www.dustindiaz.com/css-shorthand/#borderProperty" title="Jump to Border Properties on this page">border shorthand section</a> on this document to understand the odds, ends, and quirks of the outline property.</p>
<h3>List-style</h3>
<p>This is it. The last one. It’s rarely used frequently. Hence rarely. That is why I kept it until the end (sorry, the best was first in my own opinion). Here is the list-style properties:</p>
<h3>list-style properties</h3>
<pre>element {
  list-style-type: (numerous);
  list-style-position:inside || outside;
  list-style-image:url(image.png);
}</pre>
<p>Here is the defaults:</p>
<h3>list-style property defaults</h3>
<pre>element {
  list-style-type:disc;
  list-style-position:outside;
  list-style-image:none;
}</pre>
<p>And for the sake of final brevity. Here is a simple example:</p>
<h3>list-style shorthand property example</h3>
<pre>ul li {
  list-style:square inside url(image.png);
}
/* in this particular case if image.png is not available
    then a square will be provided as secondary */</pre>
<p>Source: http://www.dustindiaz.com/css-shorthand/</p>
<script type="text/javascript">var wordpress_toolbar_urls = ["http:\/\/www.dustindiaz.com\/css-shorthand\/#borderProperty"];var wordpress_toolbar_url = "http://pario.no/wp-content/plugins/wordpress-toolbar/toolbar.php";var wordpress_toolbar_oinw = "n";var wordpress_toolbar_hash = "aHR0cDovL3BhcmlvLm5vLzIwMDcvMDgvMTAvY3NzLXNob3J0aGFuZC1ndWlkZS88d3B0Yj5DU1MgU2hvcnRoYW5kIEd1aWRlPHdwdGI%2BaHR0cDovL3BhcmlvLm5vPHdwdGI%2BUGFyaW8gVGVjaG5vQmxvYg%3D%3D";</script>]]></content:encoded>
			<wfw:commentRss>http://pario.no/2007/08/10/css-shorthand-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

