<?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>Webdesign, CSS, Social Media, Tech &#38; Geek Stuff &#187; beginner</title>
	<atom:link href="http://www.mr-mojo-risin.net/category/coding/beginner/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mr-mojo-risin.net</link>
	<description>Web news, CSS and HTML tweaks, social media marketing and blog resources, geeky gadgets, mind blowing graphic sites...</description>
	<lastBuildDate>Fri, 15 Jul 2011 13:18:29 +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>CSS &#8211; some basic hints</title>
		<link>http://www.mr-mojo-risin.net/2008/07/13/css-basic-hints/</link>
		<comments>http://www.mr-mojo-risin.net/2008/07/13/css-basic-hints/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 13:20:30 +0000</pubDate>
		<dc:creator>mr-mojo-risin</dc:creator>
				<category><![CDATA[beginner]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.mr-mojo-risin.net/?p=8</guid>
		<description><![CDATA[CSS (cascading style sheets) is the ultimate tool to create lean, fast, functional, SEO friendly and, though, sexy layouts. Storing style attributes in one file provides several advantages as faster loading times, the source code takes a radical diet, if all the attributes do not appear on the pages itself.]]></description>
			<content:encoded><![CDATA[<p>CSS (cascading style sheets) is the ultimate tool to create lean, fast, functional, SEO friendly and, though, sexy layouts. Storing style attributes in one file provides several advantages as faster loading times, the source code takes a radical diet, if all the attributes do not appear on the pages itself.</p>
<p>You are web designer and have to work full contact with the customer? Then you will know this situation, the customer wants that headline bold and purple &#8211; no, make it green or is blue a better choice? This goes back and forth, which would make you go crazy if you had to do the changes on thousands of subpages. Using CSS you do changes faster than the customer decides between green and yellow.</p>
<p><span id="more-8"></span></p>
<p>Ok, enough chit chat here are some tricks to get more effective:</p>
<ul>
<li><strong>Assign multiple classes on one element</strong>
<p>This is a real saver, one simply creates a &#8220;virtual&#8221; class by combing several ones, which is highly flexible and lowers the amount classes you will have to use.</p>
<p><span style="text-decoration: underline;">Example:</span></p>
<p>The text should be black, underlined and bold, now instead of using a single one containing all three attributes, you setup three with each single value (black, underlined, bold)</p>
<div class="code-example2">
<pre>
&lt;style type="text/css"&gt;
.black {color: #000;}
.underlined {text-decoration: underlined;}
.bold {font-weight: bold;}
&lt;/style&gt;

&lt;span class="black underlined bold"&gt;the text&lt;/span&gt;
</pre>
</div>
<p>On the first hand this looks intricate, one could do this with a single class, but remember if you combine the three classes, you&#8217;ll get six &#8220;virtual&#8221; ones.</li>
<li><strong>Using multiple stylesheets</strong>
<p>Splitting up the a single stylesheet first of all makes it easier to maintain for the web programmer.</p>
<div class="code-example2">
<pre>&lt;style type="text/css"&gt;
@import "main.css";
@import url("additional.css");
&lt;/style&gt;</pre>
</div>
<p>It&#8217; also possible to embed further .css files into a specific .css file by integrating &#8220;@import url(&#8220;additional.css&#8221;); right at the top of the .css document.</li>
<li><strong>Abbreviations<br />
</strong><br />
As there are always many roads to reach your destination, CSS is no exception. One can shorten the CSS code to increase the clearness of the structure.<br />
<span style="text-decoration: underline;"> Example:</span><br />
Instead of:</p>
<div class="code-example2">
<pre>.classname{
margin-top: 10px;
margin-right: 15px;
margin-bottom: 20px;
margin-left: 25px;
}</pre>
</div>
<p>the abbreviated version should be used:</p>
<div class="code-example2">
.classname{margin-top: 10px 15px 20px 25px;}
</div>
<p>The order of the values is important, they are arranged clock wise:<br />
top (12 o&#8217;clock), right (3 o&#8217;clock), bottom (6 o&#8217;clock), left (9 o&#8217;clock),<br />
That also works with the attributes padding and border.<br />
<strong><br />
Compressing attribute values</strong></p>
<p>Several attributes can be concentrated in a single one.</p>
<p><span style="text-decoration: underline;">Example:</span><br />
Instead of:</p>
<div class="code-example2">
<pre>.classname{
border-width: 10px;
border-style: solid;
border-color: #000;
}</pre>
</div>
<p>Use:</p>
<div class="code-example2">
<pre>.classname{border: 10px solid #000;}</pre>
</div>
<p>This also works on &#8220;font&#8221; and &#8220;background&#8221;, i.e. .</p>
</li>
</ul>
<div class="tweetmeme_button" style="float: left; margin-right: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.mr-mojo-risin.net%2F2008%2F07%2F13%2Fcss-basic-hints%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.mr-mojo-risin.net%2F2008%2F07%2F13%2Fcss-basic-hints%2F&amp;source=mrmojorisin&amp;style=compact&amp;service=bit.ly&amp;service_api=R_47f1cccea29760eee97be5cf0ad3e3f7&amp;hashtags=code,coding,css,seo,webdesign&amp;b=2" height="61" width="50" title="CSS   some basic hints |  image" alt=" CSS   some basic hints" /><br />
			</a>
		</div>
 <p><a href="http://www.mr-mojo-risin.net/?flattrss_redirect&amp;id=8&amp;md5=deb0adf415f9b8ace3bbd14d54b4239d" title="Flattr" target="_blank"><img src="http://www.mr-mojo-risin.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.mr-mojo-risin.net/2008/07/13/css-basic-hints/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" href="http://www.mr-mojo-risin.net/?flattrss_redirect&amp;id=8&amp;md5=deb0adf415f9b8ace3bbd14d54b4239d" type="text/html" />"
	</item>
	</channel>
</rss>

