<?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>Lifeline Blog&#187; CSS Tutorials</title>
	<atom:link href="http://www.lifelinedesign.ca/blog/category/css-tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lifelinedesign.ca/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 19 Aug 2011 21:22:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Unequal Repeating Background &#8211; Easy CSS FIX Solution</title>
		<link>http://www.lifelinedesign.ca/blog/2011/01/unequal-repeating-background-easy-css-fix-solution/</link>
		<comments>http://www.lifelinedesign.ca/blog/2011/01/unequal-repeating-background-easy-css-fix-solution/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 13:00:20 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tutorials]]></category>

		<guid isPermaLink="false">http://www.lifelinedesign.ca/blog/?p=759</guid>
		<description><![CDATA[How many times it happened that you received a design to cut/slice from a designer (or you yourself are a designer), only to find out that the background of the PSD is unequal on both sides? For example: You have a curveed line in the middle, on the left the repeating line is placed on top, while [...]]]></description>
			<content:encoded><![CDATA[<p>How many times it happened that you received a design to cut/slice from a designer (or you yourself are a designer), only to find out that the background of the PSD is unequal on both sides? For example: You have a curveed line in the middle, on the left the repeating line is placed on top, while on the right side it goes in the middle. Something like this:</p>
<div id="attachment_323" class="wp-caption aligncenter" style="width: 555px"><a href="http://alexdweb.com/blog/wp-content/uploads/2010/03/tmp.jpg"><img class="size-large wp-image-323" src="http://alexdweb.com/blog/wp-content/uploads/2010/03/tmp-1024x225.jpg" alt="" width="545" height="225" /></a><p class="wp-caption-text">Uneven repeating backgrounds ilustrated</p></div>
<p>Notice the marked areas. Well, I found a pretty awesome and easy to implement solution.</p>
<p>You slice the marked images and you do the following &#8212; when you have your main page container, as its siblings you create 2 new divs, bgHelperLeft and bgHelperRight, and you style them something like this:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:535px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">.bgHelperLeft &nbsp;{ position: absolute; z-index: -1; width: 50%; top: 0px (or where your background is); left: 0px; background-image: .. background-repeat: repeat-x; background-position: top left;}<br />
.bgHelperRight { position: absolute; z-index: -1; width: 50%; top: 0px (or where your background is); right: 0px; &nbsp;background-image: .. background-repeat: repeat-x; background-position: top left; }</div></div>
<p>Since you used z-index: -1; then it means that it won&#8217;t overlap any of your center images. Absolute positioning means that it will stay there, and those widths means that they will meet BEHIND your center area so the user won&#8217;t see the binning point &#8212; all creating a cursive flow from one side of the screen to the other side of the screen.</p>
<p>It works on all major browsers, so this is a good trick to know and have in the book.</p>
<p>Leave any questions in the comments!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelinedesign.ca/blog/2011/01/unequal-repeating-background-easy-css-fix-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE6 UL / OL Bug</title>
		<link>http://www.lifelinedesign.ca/blog/2011/01/ie6-ul-ol-bug/</link>
		<comments>http://www.lifelinedesign.ca/blog/2011/01/ie6-ul-ol-bug/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 13:00:55 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tutorials]]></category>

		<guid isPermaLink="false">http://www.lifelinedesign.ca/blog/?p=735</guid>
		<description><![CDATA[Hello again! Did you know that IE6 (and only IE6, IE7+ doesn&#8217;t have this issue) has a weird UL/OL bug ? This can be quite an issue, though not as much nowadays since people use IE8 and such, but it can be an issue for graceful degradation of your website. Let&#8217;s say you want to make a [...]]]></description>
			<content:encoded><![CDATA[<p>Hello again!</p>
<p>Did you know that <acronym title="Internet Explorer">IE</acronym>6 (and only <acronym title="Internet Explorer">IE</acronym>6, <acronym title="Internet Explorer">IE</acronym>7+ doesn&#8217;t have this issue) has a weird UL/OL bug ? This can be quite an issue, though not as much nowadays since people use IE8 and such, but it can be an issue for graceful degradation of your website.</p>
<p>Let&#8217;s say you want to make a vertical list of items that are linked-able like this:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:535px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;ul&gt;<br />
&nbsp; &nbsp; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Item 1&lt;/a&gt;&lt;/li&gt;<br />
&nbsp; &nbsp; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Item 2&lt;/a&gt;&lt;/li&gt;<br />
&nbsp; &nbsp; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Item 3&lt;/a&gt;&lt;/li&gt;<br />
&nbsp; &nbsp; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Item 4&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</div></div>
<p><span id="more-735"></span></p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:535px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ul li a { display: block; line-height: 14px; font-size: 10px;}</div></div>
<p>In all browsers except <acronym title="Internet Explorer">IE</acronym>6, the list will look OK, however <acronym title="Internet Explorer">IE</acronym>6 has a peculiar thing &#8212; because you press ENTER and you put the list items each on a new row, somehow <acronym title="Internet Explorer">IE</acronym>6 interprets that space as a white line, and you will end up with THIS:</p>
<div><a rel="attachment wp-att-46" href="http://www.lifelinedesign.ca/blog/?attachment_id=46" class="broken_link"><img class="size-full wp-image-46" src="http://alexdweb.com/blog/wp-content/uploads/2009/11/ie6vertbug.jpg" alt="IE6 HORRORS" width="376" height="449" /></a></div>
<h3>THE HORROR!!!!&#8230;</h3>
<p>Well, there are multiple ways to fix this issue, from involving Huge javascript codes to doing some very basic things. The most basic method of all is to write those links as follows:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:535px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;ul&gt;<br />
&nbsp; &nbsp; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Item 1&lt;/a&gt;&lt;/li&gt;<br />
&nbsp; &nbsp; &lt;li&gt; &lt;a href=&quot;#&quot;&gt;Item 2&lt;/a&gt;&lt;/li&gt;<br />
&nbsp; &nbsp; &lt;li&gt; &lt;a href=&quot;#&quot;&gt;Item 3&lt;/a&gt;&lt;/li&gt;<br />
&nbsp; &nbsp; &lt;li&gt; &lt;a href=&quot;#&quot;&gt;Item 4&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</div></div>
<p>The &#8220;wonders&#8221; of <acronym title="Internet Explorer">IE</acronym>6 &#8230;</p>
<p>If you have questions, post them in the comments and I will be happy to answer them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelinedesign.ca/blog/2011/01/ie6-ul-ol-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Fonts via @font-face</title>
		<link>http://www.lifelinedesign.ca/blog/2010/11/custom-fonts-via-font-face/</link>
		<comments>http://www.lifelinedesign.ca/blog/2010/11/custom-fonts-via-font-face/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 13:00:03 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tutorials]]></category>

		<guid isPermaLink="false">http://www.lifelinedesign.ca/blog/?p=592</guid>
		<description><![CDATA[Today, I&#8217;ll show you how you can embed custom fonts into your website. We&#8217;re going to do that via the CSS3.0 rule @font-face. This only works in Firefox/Safari/Opera/Chrome/+ other more modern browsers. IE7/8, unfortunately, do not qualify for &#8220;modern&#8221; status, however as long as you declare some default general fonts after your custom font, then [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I&#8217;ll show you how you can embed custom fonts into your website.</p>
<p>We&#8217;re going to do that via the CSS3.0 rule @font-face. This only works in Firefox/Safari/Opera/Chrome/+ other more modern browsers. IE7/8, unfortunately, do not qualify for &#8220;modern&#8221; status, however as long as you declare some default general fonts after your custom font, then IE won&#8217;t really have an issue rendering the &#8220;other&#8221; default fonts. If you absolutely must give IE the same custom font, you can use the .eot font-types that IE can read.</p>
<p>This is the chunk of code that you need:</p>
<pre>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:535px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">@font-face { /* declare fonts */<br />
&nbsp; &nbsp; font-family: &quot;MuseoLight&quot;;<br />
&nbsp; &nbsp; src: url(&quot;fonts/Museo300-Regular.eot&quot;);<br />
&nbsp; &nbsp; src: local(&quot;Museo 300&quot;), local(&quot;Museo-300&quot;),<br />
&nbsp; &nbsp; &nbsp; &nbsp; url(&quot;./../fonts/Museo300-Regular.woff&quot;) format(&quot;woff&quot;),<br />
&nbsp; &nbsp; &nbsp; &nbsp; url(&quot;./../fonts/Museo300-Regular.otf&quot;) format(&quot;opentype&quot;),<br />
&nbsp; &nbsp; &nbsp; &nbsp; url(&quot;./../fonts/Museo300-Regular.svg#Museo-300&quot;) format(&quot;svg&quot;);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; /* display fonts */<br />
&nbsp; &nbsp; &nbsp; &nbsp; h1 { font: 24px/1 MuseoLight, Verdana, sans-serif; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; h2 { font: 18px/1 MuseoLight, Verdana, sans-serif; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; h3 { font: 14px/1 MuseoLight, Verdana, sans-serif; }</div></div>
</pre>
<p>This pathing assumes that you have a CSS folder where you have your stylesheet, and a fonts folder where you use your custom fonts.</p>
<p>For a good web converter of fonts, I highly recommend <a href="http://www.fontsquirrel.com/fontface/generator" target="_blank">Font Squirrel | Create Your Own @font-face Kits </a>&#8211; it&#8217;s very reliable, and they even give you the CSS you&#8217;ll need to copy. So, no need to muck around with the above code too much, but it helps to understand what it actually does.</p>
<p>Basically, the above chunk of code checks the server (your website) for the custom fonts and then loads and applies them to the requested elements. There are multiple fonts because each browser had the awesome idea of only rendering their own fonts; IE has the .eot fonts, .woff is for Firefox/Gecko browsers, .otf is for Safari/Chrome, and #svg is for basically any browser that supports svg-fonts&#8230; so you&#8217;ll need all of them if you have to have some sort of consistent results via multiple browsers.</p>
<p>That&#8217;s about all for this week. Stay tuned for more!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelinedesign.ca/blog/2010/11/custom-fonts-via-font-face/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Beauty of Random Numbering with JavaScript</title>
		<link>http://www.lifelinedesign.ca/blog/2010/11/the-beauty-of-random-numbering-with-javascript/</link>
		<comments>http://www.lifelinedesign.ca/blog/2010/11/the-beauty-of-random-numbering-with-javascript/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 13:00:36 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tutorials]]></category>

		<guid isPermaLink="false">http://www.lifelinedesign.ca/blog/?p=586</guid>
		<description><![CDATA[Hello again! This is a bit nerdy, but a very cool thing you can do is to play with javascript and random numbers and the math functions (this is nerdy, all right). First, we need the functions we will work with:  math.floor() and math.random() - math.floor() &#8211; Rounds the number down to its smallest point, [...]]]></description>
			<content:encoded><![CDATA[<p>Hello again!</p>
<p>This is a bit nerdy, but a very cool thing you can do is to play with javascript and random numbers and the math functions (this is nerdy, all right).</p>
<p>First, we need the functions we will work with:  <strong>math.floor()</strong> and <strong>math.random()</strong></p>
<p>- <strong>math.floor()</strong> &#8211; Rounds the number down to its smallest point, so 4.9 becomes 4, 5.3 becomes 5 and so on and so forth</p>
<p><strong>- math.random()</strong> &#8211; Returns a number between 0 and 1</p>
<p>How can we use them both together? Very easily:</p>
<pre>// random number between 0 and 10 //
// the * 11 part is the max number you can roll, you put 11 because 0.9 x 11 is less than 11 so it will be
// rounded down to 10,
 $(document).ready(function(){
 var x = Math.floor(Math.random() * 11);
 $("body").append("&lt;div class='alpha'&gt; &lt;/div&gt;");
 $(".alpha").text(x);
});</pre>
<p>The above code will give you numbers between 0 (including 0) and 10 (including 10).</p>
<p>If you want to skip the 0, and actually get numbers between 1 to 10, then you need to do this:</p>
<pre>// however you can get also a 0 number because 0.0(something) will be rounded to 0
// in order to prevent that we add a +1 like this. this means that you will have numbers between 1 and 11
// so we have to make it * 10 instead of * 11
 $(document).ready(function(){
 var x = Math.floor(Math.random() * 10)  + 1;
 $("body").append("&lt;div class='alpha'&gt; &lt;/div&gt;");
 $(".alpha").text(x);
});</pre>
<p>The reason why I changed it to *10 is because 0.9 x 10 = 9 and adding 1 at the end of the function will bring it to 10, however 0.0 x 10 = 0 + 1 = 1, so we will never ever get a 0.</p>
<p>Of course, you can change the numbers to suit your needs.</p>
<p>This technique is very useful when you try to do random numbering or random encryption.</p>
<p>You can easily do a full number password generator just by combining the function 10-15 times (on the amount of numbers you request):</p>
<pre>$(document).ready(function(){
 var x = Math.floor(Math.random() * 10);
 var y = Math.floor(Math.random() * 10);
 var z = Math.floor(Math.random() * 10);
 var k = Math.floor(Math.random() * 10);
 var all = String(x) + String(y) + String(z) + String(k);
 $("body").append("&lt;div class='alpha'&gt; &lt;/div&gt;");
 $(".alpha").text(all);
});</pre>
<p>We did it * 10, so we don&#8217;t get a (10) number (2 numbers instead of 1) and we removed the + 1 because we want to have 0&#8242;s.</p>
<p>The script above will create a random 4 number password with 4 numbers between 1 to 0. You can add as many numbers as you want.</p>
<p>Stay tuned for more!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelinedesign.ca/blog/2010/11/the-beauty-of-random-numbering-with-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preloading Images with CSS 3.0</title>
		<link>http://www.lifelinedesign.ca/blog/2010/11/preloading-images-with-css-3-0/</link>
		<comments>http://www.lifelinedesign.ca/blog/2010/11/preloading-images-with-css-3-0/#comments</comments>
		<pubDate>Fri, 12 Nov 2010 16:06:09 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tutorials]]></category>

		<guid isPermaLink="false">http://www.lifelinedesign.ca/blog/?p=584</guid>
		<description><![CDATA[Hello! This is a short post about how to speed up your website using cutting edge CSS 3.0 techniques. Unfortunately, this isnt very viable for large scale websites (since it doesnt quite work in IE7/8), but for the other 30-60% of your users, a quick speed increase is welcome. The CSS rules are very simple: [...]]]></description>
			<content:encoded><![CDATA[<p>Hello!</p>
<p>This is a short post about how to speed up your website using cutting edge CSS 3.0 techniques. Unfortunately, this isnt very viable for large scale websites (since it doesnt quite work in IE7/8), but for the other 30-60% of your users, a quick speed increase is welcome.</p>
<p>The CSS rules are very simple:</p>
<pre>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:535px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">.preload-images {<br />
&nbsp; &nbsp; background: url(image-01.png) no-repeat -9999px -9999px;<br />
&nbsp; &nbsp; background: url(image-01.png) no-repeat -9999px -9999px,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url(image-02.png) no-repeat -9999px -9999px,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url(image-03.png) no-repeat -9999px -9999px,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url(image-04.png) no-repeat -9999px -9999px,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url(image-05.png) no-repeat -9999px -9999px;<br />
&nbsp; &nbsp; }</div></div>
</pre>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:535px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">You write this at the end of your CSS file (so you load the images after the CSS images have been loaded). Very useful when it comes to gallery images and the like.</div></div>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:535px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">This isn't a 100% sure-fire method though, and the only major consistent results seem to be when it is used with gallery-type websites, but it's a cool trick nevertheless.</div></div>
<p>Stay Tuned for more tutorials!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelinedesign.ca/blog/2010/11/preloading-images-with-css-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Optimize Your CSS</title>
		<link>http://www.lifelinedesign.ca/blog/2010/11/how-to-optimize-your-css/</link>
		<comments>http://www.lifelinedesign.ca/blog/2010/11/how-to-optimize-your-css/#comments</comments>
		<pubDate>Fri, 05 Nov 2010 13:39:02 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tutorials]]></category>

		<guid isPermaLink="false">http://www.lifelinedesign.ca/blog/?p=589</guid>
		<description><![CDATA[Hello again! Optimizing CSS can be very helpful, but for small websites, it&#8217;s highly unimportant. Ten bytes fewer or more really doesn&#8217;t really matter these days &#8212; they&#8217;re insignificant. However, if you are running a shopping cart website with 200,000 lines of code, then having clean CSS code is a huge boon, both to easily [...]]]></description>
			<content:encoded><![CDATA[<p>Hello again!</p>
<p>Optimizing CSS can be very helpful, but for small websites, it&#8217;s highly unimportant. Ten bytes fewer or more really doesn&#8217;t really matter these days &#8212; they&#8217;re insignificant. However, if you are running a shopping cart website with 200,000 lines of code, then having clean CSS code is a huge boon, both to easily make changes and to make it load faster (10 bytes here and 10 bytes there really add up!).</p>
<p>Let&#8217;s start with some easy tricks you can do:</p>
<p>1) Making sure to split your CSS between backgrounds / outer layers / navigation / static elements and different mobile elements that aren&#8217;t present in more than one page will help a lot. Only one CSS file will always be loaded and cached (the first one) while each page will download its own specific CSS file.</p>
<p>2) Keep everything neatly spaced and commented. This will help you when you have to change one link from blue to red in your giant CSS file.</p>
<p>3) Always keep duplicate properties to a minimum. Do more with less!</p>
<p>4) Combine similar numerical values, for example:</p>
<p style="text-align: center;">margin: 10px 20px 10px 20px;</p>
<p style="text-align: center;">becomes 10px 20px;</p>
<p>Stay tuned for more!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelinedesign.ca/blog/2010/11/how-to-optimize-your-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beginner: Variable Width/Height Box with CSS</title>
		<link>http://www.lifelinedesign.ca/blog/2010/05/beginner-variable-widthheight-box-with-css/</link>
		<comments>http://www.lifelinedesign.ca/blog/2010/05/beginner-variable-widthheight-box-with-css/#comments</comments>
		<pubDate>Fri, 14 May 2010 13:00:02 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tutorials]]></category>

		<guid isPermaLink="false">http://www.lifelinedesign.ca/blog/?p=437</guid>
		<description><![CDATA[Hello! This tutorial will illustrate how to create a variable width/height box with a background image and rounded corners via CSS. The solution is very easy, and the box created can be easily modified and shaped according to different widths and heights required. First: You need a PSD file or an image with the entire [...]]]></description>
			<content:encoded><![CDATA[<p>Hello!</p>
<p>This tutorial will illustrate how to create a variable width/height box with a background image and rounded corners via <acronym title="Cascading Style Sheets">CSS</acronym>.</p>
<p>The solution is very easy, and the box created can be easily modified and shaped according to different widths and heights required.</p>
<p>First: You need a <acronym title="Photoshop Layered Image">PSD</acronym> file or an image with the entire box.</p>
<p>Second: You need to have an <acronym title="HyperText Markup Language">HTML</acronym> file, a <acronym title="Cascading Style Sheets">CSS</acronym> file, and the images folder.</p>
<p><span id="more-437"></span></p>
<p>Okay, so the HTML structure will look like this:</p>
<h2>THE XHTML</h2>
<p>The first line is the container of the box.</p>
<pre>&lt;pre&gt;
&lt;div&gt;
&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;
&lt;div&gt;
&amp;nbsp;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/pre&gt;</pre>
<p>The second line is a helpful <acronym title="Cascading Style Sheets">CSS</acronym> class helper and it shows in the code what that div is doing.</p>
<p>The logic is: top bar, bottom bar, left bar, right bar, bottom-left corner, bottom-right corner, top-left corner , top-right corner. The</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:535px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">.innerRoundBorder</div></div>
<p>is another helpful <acronym title="Cascading Style Sheets">CSS</acronym> class &#8211;  you can chain your <acronym title="Cascading Style Sheets">CSS</acronym> so that you don&#8217;t have to have large specificity. The fact is that this technique is based on the specificity of the <acronym title="Cascading Style Sheet">CSS</acronym>, as you will see in the following <acronym title="Cascading Style Sheet">CSS</acronym> file below.</p>
<p>The <acronym title="Photoshop Layered Image">PSD</acronym> will be sliced like this: the corners, and then a section of each of the 4 bars, the heights must be identical of the bars, ie. the top-left corner, the top-bar, the top-right corner all of them must be of equal height, and ie. the top-left corner, the left bar, bottom-left corner (for these the width must be identical).</p>
<h3>The CSS:</h3>
<pre> .roundedBorder {
 /* heights width are set here like */

 width: 300px; height: 300px; /* or */ width: 150px; height: 500px;

 /*  or something you want, and if the lines are simple and have a simple background,
 the background-color of the INNER BOX must be set HERE, like */ 

background-color:  #f2f2f2;}</pre>
<p>To tell others who may work on the code after you, you can put a small comment at the top like this:</p>
<pre>/* border logic
t
t b
t b l
t b l r
t b l r blc
t b l r blc brc
t b l r blc brc tlc
t b l r blc brc tlc trc
*
</pre>
<pre>.roundedBorder .border {  background-image: url("./images/topBar.png");
 background-repeat: repeat-x; background-position: top center;}
.roundedBorder .border div { background-image: url("./images/bottomBar.png");
 background-repeat: repeat-x; background-position: bottom center;}&gt;
.roundedBorder .border div div { background-image: url("./images/leftBar.png");
 background-repeat: repeat-y; background-position: left center;}
.roundedBorder .border div div div { background-image: url("./images/rightBar.png");
background-repeat: repeat-y; background-position: right center;}
.roundedBorder .border div div div div { background-image: url("./images/bottomLeftCorner.png");
 background-repeat: no-repeat; background-position:  left bottom;}
.roundedBorder .border div div div div div { background-image: url("./images/bottomRightCorner.png");
 background-repeat: no-repeat; background-position: right bottom;}
.roundedBorder .border div div div div div div { background-image: url("./images/topLeftCorner.png");
 background-repeat: no-repeat; background-position: left top;}
.roundedBorder .border div div div div div div div { background-image: url("./images/topRightCorner.png");
background-repeat: no-repeat; background-position: right top;}
.roundedBorder .border div div div div div div div div { background-image: none;}
/* THIS IS VERY IMPORTANT, MAKES SURE NO IMAGES WILL SHOW TO INNER DIVS */
</pre>
<p>This technique can be used both on large scale and on small scale, however it&#8217;s best not to exaggerate a lot as the number of divs gets exponentially larger.</p>
<p>The 2nd way to make rounded corners is by using the jQuery framework and the<a href="http://www.malsup.com/jquery/corner/"> jQuery Corner Plug-in. </a>The explanations on its website will be sufficient enough to get you started, but if you require more info post a comment and I&#8217;ll see what I can do.</p>
<p>Best Regards.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelinedesign.ca/blog/2010/05/beginner-variable-widthheight-box-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced: CSS Frameworks</title>
		<link>http://www.lifelinedesign.ca/blog/2010/05/advanced-css-frameworks/</link>
		<comments>http://www.lifelinedesign.ca/blog/2010/05/advanced-css-frameworks/#comments</comments>
		<pubDate>Fri, 07 May 2010 13:00:50 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tutorials]]></category>

		<guid isPermaLink="false">http://www.lifelinedesign.ca/blog/?p=428</guid>
		<description><![CDATA[Most people would argue that CSS frameworks are the new &#8220;god&#8221; when it comes to CSS programming. Although in part this is correct, I highly disapprove of the need to use CSS frameworks for everything, for a couple of reasons. First off, a CSS framework is a very compact, complex, and relatively useful base on [...]]]></description>
			<content:encoded><![CDATA[<p>Most people would argue that CSS frameworks are the new &#8220;god&#8221; when it comes to CSS programming. Although in part this is correct, I highly disapprove of the need to use CSS frameworks for everything, for a couple of reasons.</p>
<p>First off, a CSS framework is a very compact, complex, and relatively useful base on which you can style your own elements independently. It offers basic layout classes, basic width classes, basic height classes and a standardized way to write your CSS. This is all nice and great &#8211; on paper &#8211; however, in real life and real life development it only works if you have a very specific goal you want to achieve.</p>
<p>CSS frameworks work very well when it comes to building a huge website that is PHP/ASP.NET based and which has a very standardized layout, ie. most elements on the page are placed into modules and each module is presented after a strict grid like this:</p>
<pre>&lt;div class="module"&gt;
 &lt;div class="mod-header"&gt;

 &lt;/div&gt;
 &lt;div class="mod-content clearfix"&gt;
  &lt;div class="list-item"&gt;

  &lt;/div&gt;
  &lt;div class="side-item"&gt;

  &lt;/div&gt;
 &lt;/div&gt;
&lt;/div&gt;
</pre>
<p>If you have a website that has a lot of different content on all pages, and many different ways you want the content represented, building the website via a framework is impossible.  But let&#8217;s say you wish to build an administrative panel for a software &#8212; then, since everything is modulated and everything almost looks the same because each module is a function of that CMS system (much like in wordpress admin panel ), actually making the entire CSS based on a framework is actually a smart decision that will cut your development costs significantly.</p>
<p>Also, having a framework is very good when it comes to getting people to work on your code; since I highly doubt that the developers who build the website will remain with the same company for the next 5-10 years, having a standard on which everything is built can help the newcomers get up to speed quickly and without too many hassles.</p>
<p>PRO</p>
<ul>
<li>Highly easy to build from the ground up</li>
<li>Fits like a glove when you try to build an admin-panel or anything modular</li>
<li>Helps newcomers get up to speed quickly</li>
<li>Lowers development costs</li>
</ul>
<p>CON</p>
<ul>
<li>Highly unsuited for building a regular dynamic website</li>
<li>Very complicated to learn from the start if you have zero previous knowledge</li>
<li>Lots of files to manage</li>
</ul>
<p>So, CSS frameworks have their usefulness but it&#8217;s not the &#8220;end of everything&#8221; as they are preached by various CSS coders.</p>
<p>Regarding CSS frameworks suggestions, I highly suggest jQueryUI framework which comes bundled with image-icons, CSS code, and jQuery functionality all in one, so you can grab that @ http://jQueryUI.com</p>
<p>That&#8217;s all for this week.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelinedesign.ca/blog/2010/05/advanced-css-frameworks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intermediate: Conditional Comments</title>
		<link>http://www.lifelinedesign.ca/blog/2010/02/intermediate-conditional-comments/</link>
		<comments>http://www.lifelinedesign.ca/blog/2010/02/intermediate-conditional-comments/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 02:44:26 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tutorials]]></category>

		<guid isPermaLink="false">http://www.lifelinedesign.ca/blog/?p=407</guid>
		<description><![CDATA[Today I&#8217;m going to give you some tips that relate to Conditional Comments, such as how can you use them and a nice little trick you can do with them. Without further ado, let us begin. Conditional Comments are a proprietary function created by Microsoft for Internet Explorer browsers, so developers can tag XHTML/HTML code [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;m going to give you some tips that relate to Conditional Comments, such as how can you use them and a nice little trick you can do with them. Without further ado, let us begin.</p>
<p>Conditional Comments are a proprietary function created by Microsoft for Internet Explorer browsers, so developers can tag XHTML/HTML code specially for an Internet Explorer browser. In other words, everything inside a Conditional Comment will be skipped by all browsers except IE if the Conditional Comment follows certain conditions.</p>
<p>These conditions are:  lte (lower than or equal to), lt (lower than), gt (greater than), gte ( greater than or equal to)</p>
<pre>&lt;!--[IF lte IE 6]&gt; Only stuff that will be read by browsers
 lower than Internet Explorer 6 or by Internet Explorer 6. Internet Explorer 7
 and above will not read this code &lt;![endif]--&gt;

&lt;!--[IF lt IE 6]&gt; Only browsers lowers than IE6 will
read this paragraph &lt;![endif]--&gt;

&lt;!--[IF gt IE 6]&gt; Only browsers higher than IE6 will read
this paragraph, such as IE7/IE8 and above. &lt;![endif]--&gt;

&lt;!--[IF gte IE 6]&gt; Only browsers higher than IE6 or
IE6 will read this paragraph &lt;![endif]--&gt;</pre>
<p>And an extremely nice thing you can do is that when you wish to eliminate a browser from your website, as in you do not wish to serve CSS and JS files for it, you can do this easily using XHTML code; you don&#8217;t need to do server side verification or js verification.</p>
<pre>&lt;!--[IF IE]&gt;--&gt;
THIS PARAGRAPH WILL NOT BE READ BY ANY IE version
&lt;!--&lt;![endif]--&gt;

&lt;!--[IF gte IE 7]&gt;
ONLY IE7+ will read this following paragraph
&lt;![endif]--&gt;</pre>
<p>Effectively you have removed your server from serving CSS/JS to IE6 browsers. This is done because IE6 is a very old browser and modern web applications may not work on IE6&#8230;  and if they&#8217;re dumbed down for IE6, the application may lack lots of features. You can also use this technique to send any sort of CSS, such as a basic style or a basic JS, so you provide only the basic features. The possibilities are endless.</p>
<p>Next week we&#8217;re going to talk about CSS 3.0 features <img src='http://www.lifelinedesign.ca/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Best Regards</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelinedesign.ca/blog/2010/02/intermediate-conditional-comments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Basics: Inserting CSS (Cascading Style Sheets) Code</title>
		<link>http://www.lifelinedesign.ca/blog/2010/02/the-basics-inserting-css-cascading-style-sheets-code/</link>
		<comments>http://www.lifelinedesign.ca/blog/2010/02/the-basics-inserting-css-cascading-style-sheets-code/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 21:49:07 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[CSS Tutorials]]></category>

		<guid isPermaLink="false">http://www.lifelinedesign.ca/blog/?p=372</guid>
		<description><![CDATA[Beginner Level Hello, my name is Alexandru Dinulescu (aka Alex D) and I am the XHTML/CSS coder for Lifeline Design. I have been invited to share some of my knowledge on this blog, so without further ado, this is the first lesson: how to insert CSS code into your XHTML pages. Before I begin, a [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Beginner Level</strong></p>
<p>Hello, my name is Alexandru Dinulescu (aka Alex D) and I am the XHTML/CSS coder for Lifeline Design. I have been invited to share some of my knowledge on this blog, so without further ado, this is the first lesson: how to insert CSS code into your XHTML pages.</p>
<p>Before I begin, a short explanation on what CSS is and what it does. Basically, there are 3 layers on your website: the first one is the content of the website which includes all the text, links, images, and so on. This is the content layer or the XHTML layer. On this, another layer is added which is the CSS layer &#8211; it governs how the site looks, what colors you use, the site&#8217;s position (left, center or right), widths and heights. The 3rd layer is the behavioral layer and it involves interactions between the first and the second layers based on user input. This 3rd layer is also known as the javascript layer.</p>
<p>Now involving CSS, this means that we are using the 2nd layer to style the content layer and there are a few ways to do it.</p>
<h3>The Old Way</h3>
<p>Back in the good ol&#8217; days of the late 90&#8242;s the web was a mess, as every page was table-tag based and the CSS was added inline. What does that mean? Well it&#8217;s simple, every tag had its CSS added individually instead of using a specialized option, and when you had to modify something, let&#8217;s just say that it could take hours or even days for a huge website.</p>
<p>An example looks like this:</p>
<pre>&lt;p style="color: #fff; line-height: 30px; font-weight: bold"&gt;
Individual Styled Paragraph&lt;/p&gt;</pre>
<p>Now the downsides of this method as previously stated are huge. Every time you wish to change something you have to go over all the pages and modify every individual element, which can turn a 2 minute job into a full-week job, which is good for us, the coders, but bad for business.</p>
<p>Another old way insert CSS code in XHTML was by using the &lt;style&gt; tag. This tag can either be added in the &lt;head&gt; section or anywhere in the XHTML code.</p>
<pre>&lt;style type="text/css"&gt;
 /* css code goes here */
&lt;/style&gt;
</pre>
<h3>The New Way</h3>
<p>After browser support got a bit better, another easier way of inserting CSS came to light: using the &lt;link&gt; tag inside the &lt;head&gt; tag. This means that you had an individual file that coordinated the CSS, and finally the 2 layers of content (XHTML) and presentation (CSS) got separated, thus making life easier whenever it was time to modify some things:</p>
<pre>&lt;html&gt;
 &lt;head&gt;
  &lt;link rel="stylesheet" href="./css/file.css" media="screen, handheld" type="text/css" /&gt;
 &lt;/head&gt;
 &lt;body&gt;&lt;/body&gt;
&lt;/html&gt;</pre>
<p>This method proved to be highly adequate and self-sufficient, but some developers thought of an even better way of organizing the CSS files, and they did that using the @inport feature. Basically, instead of having 1 master CSS file that contained EVERYTHING, you had a CSS file for every section of the page (or every page-module if the website was built with a modular approach in mind) and then you had a MASTER CSS that contained only a few lines such as this:</p>
<pre>/* Master CSS FILE: */
@import: url("./head.css");
@import: url("./body.css");
@import: url("./footer.css");

/* and now you can just link the master.css file instead of all 3 */
&lt;link rel="stylesheet" type="text/css" href="./css/masterCss.css" type="screen, handheld" /&gt;</pre>
<p>That&#8217;s about it for this week. Catch you all next week when I&#8217;ll talk about Conditional Comments, and how can Conditional Comments help you fix problems for Internet Explorer 6 and occasionally Internet Explorer 7 browsers.</p>
<p>Stay Tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lifelinedesign.ca/blog/2010/02/the-basics-inserting-css-cascading-style-sheets-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

