<?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>EngineerCreativity: Webdesign by Amit Shavit</title>
	<atom:link href="http://engineercreativity.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://engineercreativity.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Sat, 15 Jan 2011 13:45:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>New laptop; Which brand, type, model?</title>
		<link>http://engineercreativity.com/new-laptop-which-brand-type-model/</link>
		<comments>http://engineercreativity.com/new-laptop-which-brand-type-model/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 19:15:48 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://engineercreativity.com/blog/?p=267</guid>
		<description><![CDATA[A few weeks ago I purchased a brand new Lenovo ThinkPad T510. I've had a ThinkPad T43 for quite a while, so I decided to upgrade. Given Lenovo's (who acquired IBM not too long ago) reputation for quality and reliability, I obviously decided to stick with the ThinkPad line. Boy was that a mistake for the T510.]]></description>
				<content:encoded><![CDATA[<div id="tweetbutton267" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fengineercreativity.com%2Fnew-laptop-which-brand-type-model%2F&amp;text=New%20laptop%3B%20Which%20brand%2C%20type%2C%20model%3F&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fengineercreativity.com%2Fnew-laptop-which-brand-type-model%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://engineercreativity.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>A few weeks ago I purchased a brand new Lenovo ThinkPad T510. I&#8217;ve had a ThinkPad T43 for quite a while, so I decided to upgrade. Given Lenovo&#8217;s (who acquired IBM not too long ago) reputation for quality and reliability, I obviously decided to stick with the ThinkPad line. Boy was that a mistake for the T510.</p>
<p>It almost seems as if Lenovo screwed up badly with the T510. When you purchase a laptop with 4GB of RAM, an Intel Core i5-540M processor with 2.6 GHz (dual core, of course), and the best wireless card offered on the market today, you expect perfection. You pay $1100 for a laptop (that&#8217;s not a Mac, may I add), and you should expect NOTHING short of perfection.</p>
<p>And what do you get with the ThinkPad T510? You get disappointed, dissatisfaction, depression, anger, frustration, and many many other terrible emotions you never thought to experience with Lenovo.</p>
<p>So what were the real problems?</p>
<p>Well, I experienced two major issues that I could not resolve.</p>
<p>1) The Touchpad didn&#8217;t work (happened intermittently), and sometimes would be insensitive to my finger&#8217;s motions. When you consider a touchpad, you consider sensitivity. You expect every movement of your finger to move the mouse. You don&#8217;t want to press to hard, neither do you want to spent hours trying to figure out how it works. Also, it&#8217;s flushed with the rest of the keyboard, so it&#8217;s very hard to know where the boundaries of the touchpad are!</p>
<p>2) Perhaps the worst problem of all, the CPU gave out a high-frequency whine. This whine was consistent, and it never stopped, only under conditions when the CPU was under heavy load. This presents a lot of problems for someone who spends a lot of time in silence trying to read textbooks and do problem sets that require intense concentration. If you think this whine won&#8217;t bother you, you&#8217;re wrong. Simply wrong. I tried to get used to it, but it&#8217;s just there. You notice it. It&#8217;s bad. You can&#8217;t study with it. If you&#8217;re a person who listens to music all the time and is rarely under quiet conditions, then this problem probably won&#8217;t bother you. Otherwise, I strongly advise you to NOT purchase this computer solely because of this problem</p>
<p>So what do you think I did after I found out I paid $1100 for a computer that&#8217;s defected? Well, despite my frustration, I wanted to give Lenovo a chance to redeem themselves. So I sent them the laptop for repair (2 days after I received it). I got it 9 days later (which they said should take no more than 7 days). The note said they replaced the motherboard and fixed the touchpad.</p>
<p>Well, the note was wrong. Yes they replaced the motherboard. No the touchpad was not fixed. And no, the whining noise was not fixed. At that point, I decided to stupidly try and find a solution myself. I spent countless days researching solutions for the touchpad and the whining noise. I was able to solve the touchpad issue by reverting the drivers back to the original state. It seemed that the new drivers the Lenovo gave out were defected and thus only the older drivers worked. Go figure.</p>
<p>However, I was not able to fix the whining noise. After around a month of trying to find a solution, consulting with Lenovo employees and fellow colleagues, I came to the conclusion that I must return the laptop. This is after I spent MANY MANY hours trying to figure out a solution, installing all of my software on it, and seriously personalizing the computer, because I truly thought no Lenovo product could be this bad.</p>
<p>So if you&#8217;re about to purchase a Lenovo computer, I&#8217;d strongly advise you to stay away from the T410 and T510. They have this horrendous whining noise that you cannot avoid.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://engineercreativity.com/new-laptop-which-brand-type-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is it important to have valid xHTML and CSS?</title>
		<link>http://engineercreativity.com/is-it-important-to-have-valid-xhtml-and-css/</link>
		<comments>http://engineercreativity.com/is-it-important-to-have-valid-xhtml-and-css/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 23:08:44 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[valid css]]></category>
		<category><![CDATA[valid xhtml]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://engineercreativity.com/blog/?p=261</guid>
		<description><![CDATA[People frequently ask for their site to be validated with the W3C validation system. Therefore, we, as proficient web designers, work very hard in order to accommodate those requests. I've decided to write a small post on why having a valid website is useful both for us (web designers) and for you (the clients, end-users, general public).]]></description>
				<content:encoded><![CDATA[<div id="tweetbutton261" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fengineercreativity.com%2Fis-it-important-to-have-valid-xhtml-and-css%2F&amp;text=Is%20it%20important%20to%20have%20valid%20xHTML%20and%20CSS%3F&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fengineercreativity.com%2Fis-it-important-to-have-valid-xhtml-and-css%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://engineercreativity.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>People frequently ask for their site to be validated with the W3C validation system. Therefore, we, as proficient web designers, work very hard in order to accommodate those requests. I&#8217;ve decided to write a small post on why having a valid website is useful both for us (web designers) and for you (the clients, end-users, general public).</p>
<p><em><strong>Search Engine Optimization</strong></em></p>
<p>The first reason having valid xHTML and CSS code is for search engines to have an easier and better time <em>crawling</em> your website. If you&#8217;re trying to promote your website <em>organically</em>, then this valid code is a prerequisite. However, if you&#8217;re going to promote your website through <em>Adwords</em> and other such methods, then it honestly does not matter at all. You can have all the errors in the world and people will still come to your site because you&#8217;re paying <em>money per click</em>.</p>
<p>Bottom line: <span style="text-decoration: underline">Valid xHTML and CSS are important for organically promoted sites</span></p>
<p><em><strong>Bugs and other troubleshooting</strong></em></p>
<p>Before you can start your troubleshooting process, the first step is to first verify the xHTML and CSS code. If you forgot to close a tag, or forgot to close a selector in your CSS file, then you&#8217;re in for a treat. But if you validate it first, you&#8217;ll know <em><strong>exactly</strong></em> where your <em><strong>error</strong></em> is, and thus you can fix it and be on your way to a cleaner website. Frequently, once you move on to the <em>error-free </em>side, you find yourself with many less bugs than before.</p>
<p>Bottom line: <span style="text-decoration: underline">Valid xHTML and CSS are the <em>most useful</em> for web designers, as it helps them create a cleaner, bug-free site compatible with a larger spectrum of browsers</span></p>
<p>So there you have it. Some of the reasons why having valid xHTML and CSS code does actually matter, and some reasons and scenarios when it doesn&#8217;t matter.</p>
<p>See you around!</p>
]]></content:encoded>
			<wfw:commentRss>http://engineercreativity.com/is-it-important-to-have-valid-xhtml-and-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The print CSS stylesheet</title>
		<link>http://engineercreativity.com/the-print-css-stylesheet/</link>
		<comments>http://engineercreativity.com/the-print-css-stylesheet/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 14:08:03 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[xhtml html css stylesheet tutorial print-css print]]></category>

		<guid isPermaLink="false">http://engineercreativity.com/blog/?p=254</guid>
		<description><![CDATA[Have you ever wondered what happens when you select to print a website? Does it just print what you see on the page? What if you have a website with a black background, that's going to be a LOT of ink. Think there's a way to change the way things are printed?]]></description>
				<content:encoded><![CDATA[<div id="tweetbutton254" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fengineercreativity.com%2Fthe-print-css-stylesheet%2F&amp;text=The%20print%20CSS%20stylesheet&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fengineercreativity.com%2Fthe-print-css-stylesheet%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://engineercreativity.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>Have you ever wondered what happens when you select to print a website? Does it just print what you see on the page? What if you have a website with a black background, that&#8217;s going to be a LOT of ink. Think there&#8217;s a way to change the way things are printed?</p>
<p>Yes, there is. Using CSS! When we declare a CSS stylesheet, we do it the following way:</p>
<pre>&lt;link rel="stylesheet" href="styles.css" type="text/css" media="<span style="color: #0000ff">screen</span>" /&gt;
&lt;...&gt;
&lt;..rest of your page..&gt;</pre>
<p>But if you wanted to designate a stylesheet for printing, you could do the following:</p>
<pre>&lt;link rel="stylesheet" href="styles.css" type="text/css" media="<span style="color: #0000ff">print</span>" /&gt;

<pre>&lt;...&gt;
&lt;..rest of your page..&gt;</pre>
<p>This way, you can change the way things are printed. For example, one of my recent <em><strong>print stylesheets</strong></em> included the following definitions:</p>
<pre>

#header,#footer,#categoryNav,img { display: none; }

p { width: auto; margin-right: 0; margin-bottom: 15px; }

#page { width: 500px; margin-right: 0; padding: 0; }

</pre>
<p>You see, I make everything hidden, such as the footer, the header, the categories navigation, everything. Also, if some of my <em><strong>divs</strong></em> have a right margin or padding, I get rid of it. This way, when you print an article on your website, it <em>just</em> prints the <strong><em>article</em></strong>, not anything else. No useless images or insane right margins or left margins!</p>
<p>That&#8217;s it for today! Hope you learned something!</p>
]]></content:encoded>
			<wfw:commentRss>http://engineercreativity.com/the-print-css-stylesheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning xHTML and CSS &#8211; day 25 of 30</title>
		<link>http://engineercreativity.com/learning-xhtml-and-css-day-25-of-30/</link>
		<comments>http://engineercreativity.com/learning-xhtml-and-css-day-25-of-30/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 21:24:34 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[free course]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Stylesheets]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://engineercreativity.com/blog/?p=248</guid>
		<description><![CDATA[Yesterday’s post was about a two-column fully modernized, table-less, div-based site using standard CSS2 and some CSS3  definitions. Hopefully, one of these days, I’ll get around to do a screencast about building this type of site from scratch, go over all of the necessary steps as well as some troubleshooting bug issues. However, today’s post will review some of those things. Scroll to the bottom to see the upcoming website designs!]]></description>
				<content:encoded><![CDATA[<div id="tweetbutton248" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-25-of-30%2F&amp;text=Learning%20xHTML%20and%20CSS%20%26%238211%3B%20day%2025%20of%2030&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-25-of-30%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://engineercreativity.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p><strong>Learning xHTML and CSS &#8211; day 25 of 30</strong></p>
<p><em>Building a <span style="text-decoration: underline">two-column</span> website from scratch using fully modernized, CSS2 &amp; 3, div-based design.</em></p>
<p>Yesterday’s post was about a <strong><em>two-column</em></strong> <em>fully modernized, table-less, div-based</em> site using standard <strong><em>CSS2</em></strong> and some <strong><em>CSS3</em></strong> definitions. Hopefully, one of these days, I’ll get around to do a screencast about building this type of site from scratch, go over all of the necessary steps as well as some troubleshooting bug issues. However, today’s post will review some of those things. Scroll to the bottom to see the upcoming website designs!</p>
<p><em>A note about troubleshooting</em></p>
<p>Whenever you build a site, you’ll almost always run into some initial bug or misalignment issues. If you don’t, check your site with IE7. And if you don’t have issues in that as well, my hat’s off to you, ‘cuz that’s just sick.</p>
<p><em>Reasons for bugs</em></p>
<p>There are many reasons for bugs. Most of them are easily fixed. Why do they happen? Well, they happen because you probably forgot to take something into account. Whether it’s your <strong><em>div’s</em></strong> border that’s adding width to your div, thereby throwing off your alignment. Or whether it’s padding, margin, what have you. Something could have happened to misalign your <strong><em>divs</em></strong>. Another frequent bug that most people overlook but get used to very very quickly is the floating bug issue. If you remember our floating post, something that’s floating is not <strong><em>actually</em></strong> within the box. I mean, it is, but it doesn’t govern the wrapping box’s <strong><em>height</em></strong>. So that’s why the items following the <strong><em>floated divs</em></strong> have to <strong><em>use clearing</em></strong> techniques so that they’re positioned correctly.</p>
<p><em>Some <span style="text-decoration: underline">clearing</span> techniques that we’ve discussed</em></p>
<pre>

Some-div { clear: [both,left,right]; }
.clear-div { clear: both; }

</pre>
<p>Above I introduced the clearing div. It’s simply a div with a <strong><em>class of clear </em></strong>that’s used after any <strong><em>floating divs</em></strong>. So it’d look like this:</p>
<pre>&lt;div id=”float1”&gt;&lt;/div&gt;
&lt;div id=”float2”&gt;&lt;/div&gt;
&lt;div id=”float3”&gt;&lt;/div&gt;
&lt;div class=”clear”&gt;&lt;/div&gt;</pre>
<p>Okay. Now that <strong><em>floating</em></strong> fixes and <strong><em>troubleshooting</em></strong><em> </em>fixes are taken care of, let’s get down to business.</p>
<p><em>The xHTML code for our website</em></p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;

&lt;head&gt;
&lt;title&gt;My first website&lt;/title&gt;
&lt;link href="reset.css" rel="stylesheet" type="text/css" /&gt;
&lt;link href="styles.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;div id="pagewrap"&gt;
 &lt;div id="header"&gt;
 &lt;p&gt;this div is 700 pixels wide, centered, and 10-pixel margin from top&lt;/p&gt;
 &lt;ul id="nav"&gt;
 &lt;li&gt;&lt;a href="index.html"&gt;home&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="about.html"&gt;I'm 100px wide&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="contact.html"&gt;I'm 100px wide&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;
 &lt;div class="clear"&gt;&lt;/div&gt;
 &lt;/div&gt;

 &lt;div id="content"&gt;
 &lt;div id="sidebar"&gt;
 &lt;p&gt;left sidebar. 250px X 500px&lt;/p&gt;
 &lt;/div&gt;

 &lt;div id="main"&gt;
 &lt;p&gt;main content. 430px X 500px&lt;/p&gt;
 &lt;/div&gt;

 &lt;/div&gt;

 &lt;div class="clear"&gt;&lt;/div&gt;

 &lt;div id="footer"&gt;
 &lt;p&gt;footer section. full width, centered, 10 pixel margin from top and bottom&lt;/p&gt;
 &lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><em>The CSS style definitions are</em></p>
<pre>

/* BASICS */
body { font-size: 12px; font-family: Arial, sans-serif; background: #f4f4f4; }
.clear { clear: both; }
.center { margin: 0 auto; text-align: center; color: gray;}
.h { line-height: 500px; }
#pagewrap { width: 700px; margin: 10px auto; border: solid 1px black; padding-top: 10px; background: #cccccc; }
#pagewrap a { text-decoration: none; color: black; }

/* navigation */
#nav { margin: 20px auto; width: 400px; }
#nav li { list-style-type: none; float: left; margin-left: 10px; text-align: center; }
#nav li a { padding: 2px 10px; border: solid 1px black; width: 100px; display: block; background: black;color: white;}
#nav li a:hover { text-decoration: underline; }

/* sidebar */
#sidebar { width: 250px; height: 500px; border: solid 1px black; float: left; margin: 10px 10px 0 10px; background: white;}

/* main */
#main { float: left; width: 416px; height: 500px; border: solid 1px black; margin: 10px 10px 0 0; background: white;}

/* footer */
#footer { width: 678px; margin: 10px 10px; border: solid 1px black; padding: 10px 0;}

/* rounded corners CSS3 */
#pagewrap,#nav li a,#sidebar,#main,#footer {
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius:10px;
}

</pre>
<p><!--[if gte mso 9]&gt;  Normal 0     false false false  EN-US X-NONE HE                           &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:1; 	mso-generic-font-family:roman; 	mso-font-format:other; 	mso-font-pitch:variable; 	mso-font-signature:0 0 0 0 0 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:Arial; 	mso-bidi-theme-font:minor-bidi;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:Arial; 	mso-bidi-theme-font:minor-bidi;} .MsoPapDefault 	{mso-style-type:export-only; 	margin-bottom:10.0pt; 	line-height:115%;} @page WordSection1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.WordSection1 	{page:WordSection1;} --><!--[if gte mso 10]&gt; &lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin-top:0in; 	mso-para-margin-right:0in; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:&quot;Times New Roman&quot;; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} --> <!--[endif]--></p>
<p class="MsoNormal">So, how does that compare to what you had? Is it the same? Different? Were you surprised?</p>
<p class="MsoNormal">First, I want to mention that I did end up using the <strong><em>clear fix div.</em></strong> I find it very very useful. Second, as you can see, the two columns are simply floating columns with some padding, height, and width. This site is considered one of the simpler sites to build, and I hope you can use it in your future endeavors.</p>
<p class="MsoNormal">So you see, it’s not that hard!</p>
<p class="MsoNormal"><strong>Summary</strong></p>
<p class="MsoNormal">Today we built a <strong><em>two-column website from scratch</em></strong>. We used standard compatible <strong><em>CSS2</em></strong><em> and <strong>xHTML</strong></em> as well as some modern <strong><em>CSS3</em></strong> style definitions. I might have to stop the course a little short, as I’m getting uber uber busy with grad school stuff, and am finding it very hard to keep up with these daily posts.</p>
<p class="MsoNormal">So I hope you enjoyed it and keep reading so you can learn more neat and helpful facts and information!</p>
<p class="MsoNormal"><strong>Upcoming posts</strong></p>
<p class="MsoNormal">So I took some time off and prepared the next several websites that we&#8217;ll design. I saved the &#8216;tricky&#8217; one for last. Primarily because it&#8217;s just tricky and serves no real-world usage&#8230;</p>
<p class="MsoNormal">Anyway, have a glimpse at the below images, make sure to click them so that you can see the full-size version. See you soon, keep checking back!</p>
<p class="MsoNormal"><a href="http://localhost/wordpress/wp-content/uploadsengineercreativity.com/wp-content/uploads/2010/08/one-column.png"><br />
</a><a href="http://localhost/wordpress/wp-content/uploadsengineercreativity.com/wp-content/uploads/2010/08/3clmn-with-search.png"></a><a href="http://engineercreativity.com/wp-content/uploads/2010/08/3clmn-with-search.png"><img class="aligncenter size-medium wp-image-249" src="http://engineercreativity.com/wp-content/uploads/2010/08/3clmn-with-search-300x195.png" alt="" width="300" height="195" /></a><a href="http://engineercreativity.com/wp-content/uploads/2010/08/three-column.png"><img class="aligncenter size-medium wp-image-252" src="http://engineercreativity.com/wp-content/uploads/2010/08/three-column-300x195.png" alt="" width="300" height="195" /></a><a href="http://engineercreativity.com/wp-content/uploads/2010/08/one-column.png"><img class="aligncenter size-medium wp-image-251" src="http://engineercreativity.com/wp-content/uploads/2010/08/one-column-300x195.png" alt="" width="300" height="195" /></a><a href="http://engineercreativity.com/wp-content/uploads/2010/08/5squares.png"><img class="aligncenter size-medium wp-image-250" src="http://engineercreativity.com/wp-content/uploads/2010/08/5squares-300x163.png" alt="" width="300" height="163" /></a></p>
<div style="width: 1px;height: 1px;overflow: hidden">
<p><!--[if gte mso 9]&gt;  Normal 0     false false false  EN-US X-NONE HE                           &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:1; 	mso-generic-font-family:roman; 	mso-font-format:other; 	mso-font-pitch:variable; 	mso-font-signature:0 0 0 0 0 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:Arial; 	mso-bidi-theme-font:minor-bidi;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:Arial; 	mso-bidi-theme-font:minor-bidi;} .MsoPapDefault 	{mso-style-type:export-only; 	margin-bottom:10.0pt; 	line-height:115%;} @page WordSection1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.WordSection1 	{page:WordSection1;} --><!--[if gte mso 10]&gt; &lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin-top:0in; 	mso-para-margin-right:0in; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:&quot;Times New Roman&quot;; 	mso-fareast-theme-font:minor-fareast; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin;} --> <!--[endif]--></p>
<p class="MsoNormal">So, how does that compare to what you had? Is it the same? Different? Were you surprised?</p>
<p class="MsoNormal">First, I want to mention that I did end up using the <strong><em>clear fix div.</em></strong> I find it very very useful. Second, as you can see, the two columns are simply floating columns with some padding, height, and width. This site is considered one of the simpler sites to build, and I hope you can use it in your future endeavors.</p>
<p class="MsoNormal">So you see, it’s not that hard!</p>
<p class="MsoNormal"><strong>Summary</strong></p>
<p class="MsoNormal">Today we built a <strong><em>two-column website from scratch</em></strong>. We used standard compatible <strong><em>CSS2</em></strong><em> and <strong>xHTML</strong></em> as well as some modern <strong><em>CSS3</em></strong> style definitions. I might have to stop the course a little short, as I’m getting uber uber busy with grad school stuff, and am finding it very hard to keep up with these daily posts.</p>
<p class="MsoNormal">So I hope you enjoyed it and keep reading so you can learn more neat and helpful facts and information!</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://engineercreativity.com/learning-xhtml-and-css-day-25-of-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning xHTML and CSS &#8211; day 24 of 30</title>
		<link>http://engineercreativity.com/learning-xhtml-and-css-day-24-of-30/</link>
		<comments>http://engineercreativity.com/learning-xhtml-and-css-day-24-of-30/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 16:40:00 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[free course]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Stylesheets]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://engineercreativity.com/blog/?p=245</guid>
		<description><![CDATA[Today's post is very very very short. I'm going to show you an image of a site I just built. Each section has its properties written in it. Your job is to hopefully replicate it as best you can. Tomorrow I'll share the xHTML and CSS code. So here we go, our first real live useful website from scratch.]]></description>
				<content:encoded><![CDATA[<div id="tweetbutton245" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-24-of-30%2F&amp;text=Learning%20xHTML%20and%20CSS%20%26%238211%3B%20day%2024%20of%2030&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-24-of-30%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://engineercreativity.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p><strong>Learning xHTML and CSS &#8211; day 24 of 30</strong></p>
<p><em>Building our first 2-column site from scratch</em></p>
<p>Today&#8217;s post is very very very short. I&#8217;m going to show you an image of a site I just built. Each section has its properties written in it. Your job is to hopefully replicate it as best you can. Tomorrow I&#8217;ll share the xHTML and CSS code. So here we go, our <em><strong>first real live useful website from <span style="text-decoration: underline">scratch</span></strong></em>.</p>
<p>Take a look at the picture below and try to replicate it as best you can. Click it to view a full version!</p>
<p><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson23-11.png"><img class="aligncenter size-medium wp-image-246" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson23-11-300x195.png" alt="" width="300" height="195" /></a></p>
<p>Again, click the image to view the full version. Good luck!</p>
<p>Be sure to subscribe to the <strong><em>RSS feed </em></strong>so you can get    the new post by               email (via the RSS feed link or through the <strong><em> Email RSS    Subscription </em></strong>in  the sidebar on the right).  Also, feel    free to <a title="Contact me directly to my email!" href="mailto:contact@engineercreativity.com">contact me</a> with any   questions, or use    my <a title="Contact me through my online form" href="../../#contact">contact form</a> to send me any private comments, suggestions, price quotes, job offers,          feedback or just a plain “hi!”. Finally, make sure to check out  <a title="Amit's webdesign portfolio" href="../../portfolio.html">my portfolio</a> to see my latest work.</p>
]]></content:encoded>
			<wfw:commentRss>http://engineercreativity.com/learning-xhtml-and-css-day-24-of-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning xHTML and CSS &#8211; day 23 of 30</title>
		<link>http://engineercreativity.com/learning-xhtml-and-css-day-23-of-30/</link>
		<comments>http://engineercreativity.com/learning-xhtml-and-css-day-23-of-30/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 07:36:10 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[free course]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Stylesheets]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://engineercreativity.com/blog/?p=240</guid>
		<description><![CDATA[Today's post is really a continuation of yesterday's post and a conclusion of CSS3 (for now). Today we'll look at text-shadow and box-shadow CSS3 style definitions. We're on the home-stretch of building a website from scratch. I thought I'd change it up a little and introduce a new method.]]></description>
				<content:encoded><![CDATA[<div id="tweetbutton240" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-23-of-30%2F&amp;text=Learning%20xHTML%20and%20CSS%20%26%238211%3B%20day%2023%20of%2030&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-23-of-30%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://engineercreativity.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson23-1.png"><img class="alignleft size-medium wp-image-241" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson23-1-234x300.png" alt="" width="234" height="300" /></a><strong>Learning xHTML and CSS &#8211; day 23 of 40</strong></p>
<p><em>CSS3 box shadow and text shadow</em></p>
<p>Today&#8217;s post is really a continuation of yesterday&#8217;s post and a conclusion of <em><strong>CSS3</strong></em> (for now). Today we&#8217;ll look at <em><strong>text-shadow</strong></em> and <strong><em>box-shadow</em></strong> <em>CSS3 </em>style definitions. We&#8217;re on the home-stretch of building a website from scratch. I thought I&#8217;d change it up a little and introduce a new method.</p>
<p><em>The best way to learn is by doing</em></p>
<p>The next seven or so posts will be dealing with <strong><em>building different type of websites from scratch</em></strong>. Each day we&#8217;ll start from <strong><em>nothing</em></strong>. Hopefully I&#8217;ll be able to keep up with this pace, but I&#8217;ll try to post up an image of the type of website that we should create the day before so you can try to practice it. Then together we&#8217;ll build them up. I&#8217;ll also try to integrate some <strong><em>video tutorials </em></strong>/ <strong><em>screencasts</em></strong> so that it could be easier to follow when seeing me do it. Anyway, enjoy the last bit of <strong><em>mini-lessons</em></strong> that we have, because from here on end, it&#8217;s about to get bumpy!@$$#</p>
<p><em><strong>CSS3 box shadow</strong></em></p>
<p>The <em>CSS3 <strong>box-shadow </strong></em> property is very useful when used correctly. As you can see in the above image, it&#8217;s obviously extremely ugly and I&#8217;ve done so just to show what exactly the <em><strong>box-shadow</strong></em> property does. The <em><strong>CSS</strong></em> definitions for <em><strong>box shadow</strong></em> are the following:</p>
<pre>

box-shadow: 2px 2px #c3c3c3; /* required */
-moz-box-shadow: 2px 2px red; /* firefox */
-webkit-box-shadow: 2px 2px #c3c3c3; /* safari,chrome */

</pre>
<p>In general it goes like this:</p>
<pre>box-shadow: [x-value] [y-value] [color-of-shadow];
</pre>
<p>That means that if you change that first value to a larger (positive) value, the shadow will go more to the right. However, you can make that number negative as well, and the <em><strong>shadow</strong></em> will flip directions (go to the left). Similarly, changing the second value changes the <em><strong>y-position</strong></em> of the <em><strong>shadow</strong></em> in the same fashion as the first value.</p>
<p><strong><em>The text shadow property</em></strong></p>
<p><em>Text-shadow</em><em> </em>is actually used very frequently in web design these days. Like most beautiful things, it&#8217;s not supported by <em><strong>Internet Explorer (IE)</strong></em>. But there are a few filters you can write to make it <em><strong>IE-capable</strong></em>.</p>
<p>The text-shadow property looks like this:</p>
<pre>

text-shadow: 1px 1px 1px white;

</pre>
<p>And with further explanation and generalization, it looks like this:</p>
<pre>text-shadow: [x-value] [y-value] [blur-value] [color];
</pre>
<p>As you can see, all values in <em><strong>CSS</strong> </em>always start with the <em><strong>x-value</strong></em>, then continue with the <em><strong>y-value</strong></em>. In <em><strong>text-shadow</strong></em>, however, we also have the <em>blur value</em>. This is the degree to which the shadow is <em>blurred</em>. It&#8217;s a little hard to see from the image, but there&#8217;s actually a white shadow to the MAIN CONTENT text.</p>
<p><strong>Summary</strong></p>
<p>Today we reviewed two more <em><strong>CSS3 </strong></em>properties named <em><strong>text-shadow</strong></em> and <strong><em>box-shadow</em></strong>. Today also marks the end of these mini xHTML/CSS lessons and the beginning of a tough journey toward building various types of websites from absolutely <em><strong>nothing</strong></em>. We&#8217;re going to build <em><strong>two-column websites, three-column, one-column, </strong></em>and we&#8217;ll mix it up a little. It&#8217;s about to get exciting!</p>
<p>Be sure to subscribe to the <strong><em>RSS feed </em></strong>so you can get    the new post by               email (via the RSS feed link or through the <strong><em> Email RSS    Subscription </em></strong>in  the sidebar on the right).  Also, feel    free to <a title="Contact me directly to my email!" href="mailto:contact@engineercreativity.com">contact me</a> with any   questions, or use    my <a title="Contact me through my online form" href="../../#contact">contact form</a> to send me any private comments, suggestions, price quotes, job offers,         feedback or just a plain “hi!”. Finally, make sure to check out <a title="Amit's webdesign portfolio" href="../../portfolio.html">my portfolio</a> to see my latest work.</p>
]]></content:encoded>
			<wfw:commentRss>http://engineercreativity.com/learning-xhtml-and-css-day-23-of-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning xHTML and CSS &#8211; day 22 of 30</title>
		<link>http://engineercreativity.com/learning-xhtml-and-css-day-22-of-30/</link>
		<comments>http://engineercreativity.com/learning-xhtml-and-css-day-22-of-30/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 13:33:15 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[free course]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[Stylesheets]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://engineercreativity.com/blog/?p=233</guid>
		<description><![CDATA[These days CSS3 is everywhere. What is CSS3? Well, everything we've been working with thus far has been xHTML (or HTML 4) and CSS2. With today's rapid technological advancement, a wide variety of features and designs are easily integrated using simple CSS3 style definitions. So how do we do it? Continue reading to find out.]]></description>
				<content:encoded><![CDATA[<div id="tweetbutton233" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-22-of-30%2F&amp;text=Learning%20xHTML%20and%20CSS%20%26%238211%3B%20day%2022%20of%2030&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-22-of-30%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://engineercreativity.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p><strong><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson22-2.png"><img class="alignleft size-medium wp-image-236" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson22-2-224x300.png" alt="" width="224" height="300" /></a>Learning xHTML and CSS &#8211; day 22 of 30</strong></p>
<p><em>A brief introduction to two </em><strong><em>CSS3 properties</em></strong></p>
<p>These days <em><strong>CSS3</strong></em> is everywhere. What is <strong><em>CSS3</em></strong>? Well, everything we&#8217;ve been working with thus far has been xHTML (or HTML 4) and <em><strong>CSS2</strong></em>. With today&#8217;s rapid technological advancement, a wide variety of features and designs are easily integrated using simple <em><strong>CSS3</strong></em> style definitions. So how do we do it? Continue reading to find out.</p>
<p><strong><em>CSS3 basic information</em></strong></p>
<p>Well, because <em>CSS3</em> is so new, it&#8217;s only currently supported by the most modern <em>browsers. </em>All WebKit engine-based <em>browsers</em> (such as <em>Google Chrome</em> and <em>Safari</em>) support <em><strong>CSS3</strong></em>. In addition, <em>Firefox 3.6+</em> and <em>Opera </em>also support <strong><em>CSS3</em></strong>. Well, that leaves one brand that doesn&#8217;t. Yup. IE. <em>Internet Explorer</em> (6,7, and even 8) do <em>not</em> support CSS3. So if your site contains a lot of <em>CSS3</em> styles, plan on it looking very basic under <em>Internet Explorer.</em></p>
<p><em>CSS3 property #1: <strong>Rounded Corners</strong></em></p>
<p>Suppose you have a <em>div</em> and you wanted to give it <em><strong>rounded corners</strong></em>. How would you accomplish it? Using <em><strong>CSS2</strong></em>, you&#8217;d have to design the <strong><em>rounded corners</em></strong> in Photoshop or what-have-you, then use the <em>background</em> property to correctly set it. <em><strong>CSS3 is much much easier</strong></em>. All you do in <em><strong>CSS3</strong></em> is the following:</p>
<pre>

div {

border: solid 1px black; /* required for fallback if CSS3 is not supported */

-moz-border-radius: 10px; /* deals with Mozilla-based browsers (Firefox) */

-webkit-border-radius: 10px; /* deals with WebKit-engine browsers */

border-radius: 10px; /* required but doesn't do anything...yet */

}

</pre>
<p>So let&#8217;s apply these styles to one of our MAIN CONTENT div:</p>
<p><em>This is our xHTML</em></p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;

&lt;head&gt;
&lt;title&gt;My first website&lt;/title&gt;
&lt;link href="reset.css" rel="stylesheet" type="text/css" /&gt;
&lt;link href="styles.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;div id="pagewrap"&gt;
 &lt;div id="header"&gt;
 &lt;h1&gt;My first website!&lt;/h1&gt;
 &lt;/div&gt;

 &lt;div id="content"&gt;
 &lt;ul id="nav"&gt;
 &lt;li&gt;&lt;a href="index.html"&gt;home&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="about.html"&gt;about me&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="contact.html"&gt;contact me&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;

 &lt;/div&gt;

 &lt;div id="main"&gt;
 MAIN CONTENT DIV
 &lt;/div&gt;

 &lt;div id="footer"&gt;
 &lt;p&gt;This is our footer section&lt;/p&gt;
 &lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><em>And this is our CSS</em></p>
<pre>

body { background-color: white; font-size: 12px; }
a { color: red; font-size: 12px; text-decoration: none; }
a:hover { color: blue; text-decoration: underline; }
h1 { font-size: 20px; border-bottom: solid 2px orange; }
#header { height: 30px; }
#navigation { height: 20px; }
#content { height: 20px; }
#footer { height: 20px; border-top: dotted 1px black;  }

/* NEW STYLES FOR NAVIGATION */
#nav li {
list-style-type: none;
float: left;
margin-left: 10px;
}
#nav li a {
padding: 2px 10px;
border: solid 1px black;
}
#nav li a:hover {
background-color: orange;
}

/* NEW STYLES for absolute positioning */
#main { height: 200px; width: 200px; margin: 15px; line-height: 200px; text-align: center; background: #cccccc;  }

/* NEW CSS3 PROPERTIES */
#main,#nav li a {
border: solid 1px black;
border-radius: 30px;
-moz-border-radius: 30px;
-webkit-border-radius: 30px;
}

</pre>
<p><em><strong>And finally, this is our result</strong></em></p>
<p style="text-align: center"><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson22-1.png"><img class="size-medium wp-image-235 aligncenter" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson22-1-224x300.png" alt="" width="224" height="300" /></a></p>
<p style="text-align: left">Now you can change the border-radius and make it so large that the MAIN CONTENT div becomes a circle. Let&#8217;s do that now, make the <em><strong>border-radius</strong></em> 300 pixels.</p>
<p style="text-align: left"><em>New CSS3 definitions</em></p>
<p style="text-align: left">
<pre>#main,#nav li a {
border: solid 1px black;
border-radius: 300px;
-moz-border-radius: 300px;
-webkit-border-radius: 300px;
}</pre>
</p>
<p style="text-align: left">And the new result is:</p>
<p style="text-align: left"><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson22-2.png"><img class="aligncenter size-medium wp-image-236" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson22-2-224x300.png" alt="" width="224" height="300" /></a></p>
<p style="text-align: left">That&#8217;s it for today. Tomorrow we&#8217;ll discuss one more <em><strong>CSS3</strong></em> property called <em><strong>box shadow</strong></em> and <em><strong>text-shadow</strong></em>. By the sound of it, you can probably imagine what they do.</p>
<p style="text-align: left"><strong>Summary</strong></p>
<p style="text-align: left">Today we introduced <em><strong>CSS3</strong></em>. If it&#8217;s not obvious to you yet, <em><strong>CSS3</strong></em> contains an unbelievable deal of style definitions that can significantly ease on your daily tasks. The only drawback is that <em>CSS3</em> is only supported by the most modern browsers, excluding IE. So keep in mind that if you use a lot of <em>CSS3</em> and find out that a significant percentage of your audience use IE, I would recommend falling back to <strong><em>CSS2</em></strong><em> </em>and instead using old-fashioned shadow backgrounds, rounded corner pictures, etc. etc.</p>
<p style="text-align: left">Be sure to subscribe to the RSS feed so you can get    the new post by              email (via the RSS feed link or through the    Email RSS   Subscription    in  the sidebar on the right).  Also, feel    free to <a title="Contact me directly to my email!" href="mailto:contact@engineercreativity.com">contact me</a> with any   questions, or use    my <a href="../../#contact">contact form</a> to send me any private comments, suggestions, price quotes, job offers,        feedback or just a plain “hi!”. Finally, make sure to check out <a title="Amit's webdesign portfolio" href="../../portfolio.html">my portfolio</a> to see my latest work.</p>
]]></content:encoded>
			<wfw:commentRss>http://engineercreativity.com/learning-xhtml-and-css-day-22-of-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning xHTML and CSS &#8211; day 21 of 30</title>
		<link>http://engineercreativity.com/learning-xhtml-and-css-day-21-of-30/</link>
		<comments>http://engineercreativity.com/learning-xhtml-and-css-day-21-of-30/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 11:36:51 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[free course]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[Stylesheets]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[video tutorial]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://engineercreativity.com/blog/?p=224</guid>
		<description><![CDATA[As you know (if you've been paying attention), we're now past the CSS positioning tutorials, where we concentrate more on website aesthetics and functionality. Today we make a simple feedback button that when clicked opens up your default mail wizard (typically Outlook) to send an email to a predetermined address. To make this button interesting, we use a new CSS property that we haven't talked about yet called background position.]]></description>
				<content:encoded><![CDATA[<div id="tweetbutton224" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-21-of-30%2F&amp;text=Learning%20xHTML%20and%20CSS%20%26%238211%3B%20day%2021%20of%2030&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-21-of-30%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://engineercreativity.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson21-2.png"><img class="alignleft size-medium wp-image-225" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson21-2-246x300.png" alt="" width="246" height="300" /></a><strong>Learning xHTML and CSS &#8211; day 21 of 30</strong></p>
<p><em>Working with background positions and fixed positioning</em></p>
<p>As you know (if you&#8217;ve been paying attention), we&#8217;re now past the <strong><em>CSS positioning</em></strong> tutorials, where we concentrate more on <em>website </em>aesthetics and <em>functionality</em>. Today we make a simple <strong><em>feedback</em></strong> button that when clicked opens up your default <em><strong>mail</strong></em> wizard (typically Outlook) to send an <em>email</em> to a predetermined address. To make this button interesting, we use a new <strong><em>CSS property</em></strong> that we haven&#8217;t talked about yet called <em><strong>background position</strong></em>.</p>
<p>The way it works is simple. We have a <strong><em>link anchor</em></strong> with a specified <em>width</em> and <em>height</em> as well as <strong><em>background</em></strong>. Using the <em>pseudo-selector <strong>:hover</strong></em>, we change the <strong><em>background position</em></strong> of the <em>link anchor</em> such that a new <em>background</em> is shown.</p>
<p>Like the two previous posts, today will also be a <em><strong>video-tutorial / screencast</strong></em>. Choose the best method that works for you (whether it&#8217;s just watching, just reading, or doing both).</p>
<p style="text-align: center;"><span style="text-decoration: underline;"><em><strong>A complete demonstration of CSS fixed positioning in combination with background position</strong></em></span></p>
<p><iframe src="http://player.vimeo.com/video/14263959" width="400" height="225" frameborder="0"></iframe></p>
<p>So this is for those who wanted to keep reading (good for you!)</p>
<p><em>Below is the new xHTML that was added to our document (you can add it anywhere you want within the <span style="text-decoration: underline;">body</span> of the xHTML doc)<br />
</em></p>
<pre>&lt;div id="feedback"&gt;
  &lt;a href="mailto:contact@engineercreativity.com" title="Send EngineerCreativity an email!"&gt;&lt;/a&gt;
&lt;/div&gt;
</pre>
<p>We generate a <strong><em>div</em></strong> with an <em>id</em> of &#8216;<em>feedback</em>&#8216;. Inside that <strong><em>div</em></strong> we create a <strong><em>link anchor</em></strong> whose <em>href attribute </em>leads to &#8216;mailto:contact@engineercreativity.com&#8217;. Finally, we add a <em>title</em> to the <strong><em>link anchor</em></strong> for SEO optimization (SEO links should all have <em><strong>titles</strong></em>).</p>
<p>If you now press Save and open the page, you won&#8217;t see anything. Why? Because we didn&#8217;t add any styles and nothing is written within the <em><strong>link anchor</strong></em>.</p>
<p>So let&#8217;s add a few styles to the new xHTML portion. First we need to position the <em>feedback </em>div with <em><strong>fixed positioning</strong></em>. In addition, let&#8217;s <em>position</em> it 25% from the top (makes it <em><strong>fluid</strong></em>) and completely on the left of the page. The new <em>CSS</em> should be:</p>
<pre>

#feedback { position: fixed; top: 25%; left: 0; }

</pre>
<p>Now, if you Save and refresh the page, you still won&#8217;t see anything. Why? Well, what&#8217;s there to see? The <em>feedback</em> div is positioned to the left, yes. It contains a link within it, yes. But does the link have any style definitions? Does it have a <em><strong>width</strong></em>, a <em><strong>height</strong></em>? No. So let&#8217;s do that now. Specifically, let&#8217;s do the following:</p>
<ul>
<li>Define a <strong><em>block</em></strong> <em>display</em> so that the width and height mean something [<span style="text-decoration: underline;"><strong><em>REQUIRED</em></strong></span>]</li>
<li>Give the link a height equal to the height of the image (168 pixels)</li>
<li>Give the link a width equal to the width of the image (78 pixels) [HINT: later on we'll half this width]</li>
<li>Give the link the background of the &#8220;suggest a post&#8221; image</li>
</ul>
<p>The image is located here: http://engineercreativity.com/wp-content/uploads/2010/08/feedback.png</p>
<p><em>So let&#8217;s have a look at the CSS now</em></p>
<pre>

#feedback a { display: block; width: 78px; height: 168px; background: url(http://engineercreativity.com/wp-content/uploads/2010/08/feedback.png) no-repeat top left; }

</pre>
<p>As you can see, we styled the link with <em>block <strong>display</strong></em>, assigned a width/height and a background. The result yields the following:</p>
<p><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson21-2.png"><img class="aligncenter size-medium wp-image-225" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson21-2-246x300.png" alt="" width="246" height="300" /></a></p>
<p>Now, obviously we don&#8217;t want both of those &#8220;Suggest a post&#8221; portions to be shown, so we need to cut the width of the <strong><em>anchor link</em></strong> by <em>about half</em>.</p>
<p><em>The new CSS is</em></p>
<pre>

#feedback a { display: block; width: 37px; height: 168px; background: url(http://engineercreativity.com/wp-content/uploads/2010/08/feedback.png) no-repeat top left; }

</pre>
<p>And the new result is:</p>
<p><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson21-1.png"><img class="aligncenter size-medium wp-image-229" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson21-1-246x300.png" alt="" width="246" height="300" /></a></p>
<p>Great. Now we only have <em>one</em> &#8220;Suggest a post&#8221; showing. Now all we have to do is change the <em><strong>position of the background</strong></em> for when the mouse is <em><strong>hovered</strong></em> over the <em><strong>link anchor</strong></em>. Hopefully this is ringing bells <span style="text-decoration: underline;">USE :hover!!!</span></p>
<p><em>Thus, we add this to our CSS definitions</em></p>
<pre>

#feedback a:hover { background-position: top right; }

</pre>
<p>As you can see, we use the <strong><em>background-position</em></strong> property which is critically important and widely used in websites. People often make <strong><em>sprites</em></strong> (which are a huge compilation of images that are used on your site combined into one image). That image is loaded once and for all of the images on the site the <em><strong>backround-position</strong></em> of that image is varied. This saves <em>tremendous <strong>loading times</strong></em> and is unbelievably favorable to <strong>Search Engine Optimization</strong> <strong>[SEO]</strong> efforts.</p>
<p>More on <em><strong>sprites</strong></em> will be discussed in a different post. For now, you should understand that all that is happening when the mouse is <em><strong>hovering</strong></em> the <strong><em>link anchor</em></strong> is that it&#8217;s <em>background</em> is changing <strong><em>positions</em></strong>. That&#8217;s all!</p>
<p>We&#8217;ve now created a useful feedback button!</p>
<p><em>The full xHTML code is the following</em></p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;

&lt;head&gt;
&lt;title&gt;My first website&lt;/title&gt;
&lt;link href="reset.css" rel="stylesheet" type="text/css" /&gt;
&lt;link href="styles.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;div id="pagewrap"&gt;
 &lt;div id="header"&gt;
 &lt;h1&gt;My first website!&lt;/h1&gt;
 &lt;/div&gt;

 &lt;div id="content"&gt;
 &lt;ul id="nav"&gt;
 &lt;li&gt;&lt;a href="index.html"&gt;home&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="about.html"&gt;about me&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="contact.html"&gt;contact me&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;

 &lt;/div&gt;

 &lt;div id="main"&gt;
 MAIN CONTENT DIV
 &lt;div id="div1"&gt;1&lt;/div&gt;
 &lt;div id="div2"&gt;2&lt;/div&gt;
 &lt;div id="div3"&gt;3&lt;/div&gt;
 &lt;/div&gt;

 &lt;div id="footer"&gt;
 &lt;p&gt;This is our footer section&lt;/p&gt;
 &lt;/div&gt;

 &lt;div id="feedback"&gt;
 &lt;a href="mailto:contact@engineercreativity.com" title="Send EngineerCreativity an email!"&gt;&lt;/a&gt;
 &lt;/div&gt;

&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p><em>And the full CSS code is the following</em></p>
<pre>

body { background-color: white; font-size: 12px; }
a { color: red; font-size: 12px; text-decoration: none; }
a:hover { color: blue; text-decoration: underline; }
h1 { font-size: 20px; border-bottom: solid 2px orange; }
#header { height: 30px; }
#navigation { height: 20px; }
#content { height: 20px; }
#footer { height: 20px; border-top: dotted 1px black;  }

/* NEW STYLES FOR NAVIGATION */
#nav li {
list-style-type: none;
float: left;
margin-left: 10px;
}
#nav li a {
padding: 2px 10px;
border: solid 1px black;
}
#nav li a:hover {
background-color: orange;
}

/* NEW STYLES for absolute positioning */
#main { height: 200px; position: relative; width: 200px; margin: 15px; line-height: 200px; text-align: center; background: #cccccc;  }
#div1,#div2,#div3,#div4 { position: absolute; height: 50px; width: 50px; line-height: 50px; text-align: center; color: white; font-weight: bold; }
#div1 { top: 0; left: 0; background: green; }
#div2 { top: 0; right: 0; background: blue; }
#div3 { bottom: 0; right: 0; background: purple; }

/* NEW STYLES for feedback */
#feedback { position: fixed; top: 13.5%; left: 2px; } /* Thanks Emeka, a returning blog reader, for this suggestion! */
#feedback a { display: block; width: 37px; height: 168px; background: url(http://engineercreativity.com/wp-content/uploads/2010/08/feedback.png) no-repeat top left; }
#feedback a:hover { background-position: top right; }

</pre>
<p>Finally, I&#8217;d like to say thanks to digimantra.com for providing the &#8220;Suggest a post&#8221; image. Perhaps soon I&#8217;ll post a <em>photoshop</em> tutorial on how to create a similar image.</p>
<p><strong>Summary</strong></p>
<p>We&#8217;ve used our knowledge of <em><strong>fixed CSS positioning</strong></em> and introduced a new <strong><em>CSS property</em></strong> called <strong><em>background-position</em></strong> to successfully create a fluid, vibrant, and interesting <em>feedback</em> button. Hope you enjoyed it and learned something new!</p>
<p>Be sure to subscribe to the RSS feed so you can get    the new post by             email (via the RSS feed link or through the    Email RSS  Subscription    in  the sidebar on the right).  Also, feel    free to <a title="Contact me directly to my email!" href="mailto:contact@engineercreativity.com">contact me</a> with any   questions, or use    my <a href="../../#contact">contact form</a> to send me any private comments, suggestions, price quotes, job offers,       feedback or just a plain “hi!”. Finally, make sure to check out <a title="Amit's webdesign portfolio" href="../../portfolio.html">my portfolio</a> to see my latest work.</p>
]]></content:encoded>
			<wfw:commentRss>http://engineercreativity.com/learning-xhtml-and-css-day-21-of-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning xHTML and CSS &#8211; day 20 of 30</title>
		<link>http://engineercreativity.com/learning-xhtml-and-css-day-20-of-30/</link>
		<comments>http://engineercreativity.com/learning-xhtml-and-css-day-20-of-30/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 19:54:11 +0000</pubDate>
		<dc:creator>Amit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[free course]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[Stylesheets]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[video tutorial]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://engineercreativity.com/blog/?p=212</guid>
		<description><![CDATA[Now that you're a pro with floats, in-line elements, and absolutely positioned items, it's time to complete the CSS positioning tutorial with one last type of position named fixed positioning. While rarely used, fixed positioning brings with it various advantages. Frequently, it is used for things like sticky footers. A sticky footer is a case where the footer remains fixed at the bottom of the page no matter how you scroll or how you minimize or maximize the page.]]></description>
				<content:encoded><![CDATA[<div id="tweetbutton212" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-20-of-30%2F&amp;text=Learning%20xHTML%20and%20CSS%20%26%238211%3B%20day%2020%20of%2030&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-20-of-30%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://engineercreativity.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson20-1.png"><img class="alignleft size-medium wp-image-213" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson20-1-183x300.png" alt="" width="183" height="300" /></a><strong>Learning xHTML and CSS &#8211; day 20 of 30</strong></p>
<p><em>Everything you wanted to know about <strong>CSS fixed positioning</strong></em></p>
<p>Now that you&#8217;re a pro with <em>floats</em>, <em>in-line</em> elements, and <em>absolutely positioned items</em>, it&#8217;s time to complete the <em><strong>CSS positioning</strong></em> tutorial with one last type of <em>position</em> named <strong><em>fixed positioning</em></strong>. While rarely used, <strong><em>fixed positioning </em></strong>brings with it various <em>advantages</em>. Frequently, it is used for things like <strong><em>sticky footers</em></strong>. A <em>sticky footer</em> is a case where the <em>footer</em> remains <strong><em>fixed</em></strong> at the bottom of the page no matter how you scroll or how you minimize or maximize the page.</p>
<p style="text-align: center"><em><strong>A complete demonstration and explanation of <span style="text-decoration: underline">CSS fixed positioning</span></strong></em></p>
<p style="text-align: center"><iframe src="http://player.vimeo.com/video/14249375" width="400" height="225" frameborder="0"></iframe></p>
<p>Again, you&#8217;ll have option of reading, seeing the screencast, or doing both. As you already know my suggestion, do both. Read the article and watch the video. It&#8217;ll be super beneficial for you!</p>
<p>An example of a <em>sticky footer</em> is shown on the left. The picture from the left is an exact replica of yesterday&#8217;s xHTML and CSS code with two changes, the &#8217;4&#8242; was changed to &#8216;sticky footer&#8217;, and there was some CSS styling definition change. Let&#8217;s take a closer look at this.</p>
<p><em>First, let&#8217;s just reiterate the xHTML, even though you should have it with you if you&#8217;ve been attention!</em></p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;

&lt;head&gt;
&lt;title&gt;My first website&lt;/title&gt;
&lt;link href="reset.css" rel="stylesheet" type="text/css" /&gt;
&lt;link href="styles.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;div id="pagewrap"&gt;
 &lt;div id="header"&gt;
 &lt;h1&gt;My first website!&lt;/h1&gt;
 &lt;/div&gt;

 &lt;div id="content"&gt;
 &lt;ul id="nav"&gt;
 &lt;li&gt;&lt;a href="index.html"&gt;home&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="about.html"&gt;about me&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="contact.html"&gt;contact me&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;

 &lt;/div&gt;

 &lt;div id="main"&gt;
 MAIN CONTENT DIV
 &lt;div id="div1"&gt;1&lt;/div&gt;
 &lt;div id="div2"&gt;2&lt;/div&gt;
 &lt;div id="div3"&gt;3&lt;/div&gt;
 &lt;div id="div4"&gt;STICKY FOOTER&lt;/div&gt;
 &lt;/div&gt;    

 &lt;div id="footer"&gt;
 &lt;p&gt;This is our footer section&lt;/p&gt;
 &lt;/div&gt;
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>As you can see, no big change. Only where there was a number &#8217;4&#8242; is now changed to &#8216;STICKY FOOTER&#8217;. That&#8217;s all!!!! Now, let&#8217;s take a look at the CSS.</p>
<p><em>And this is the CSS</em></p>
<pre>

body { background-color: white; font-size: 12px; }
a { color: red; font-size: 12px; text-decoration: none; }
a:hover { color: blue; text-decoration: underline; }
h1 { font-size: 20px; border-bottom: solid 2px orange; }
#header { height: 30px; }
#navigation { height: 20px; }
#content { height: 20px; }
#footer { height: 20px; border-top: dotted 1px black;  }

/* NEW STYLES FOR NAVIGATION */
#nav li {
list-style-type: none;
float: left;
margin-left: 10px;
}
#nav li a {
padding: 2px 10px;
border: solid 1px black;
}
#nav li a:hover {
background-color: orange;
}

/* NEW STYLES for absolute positioning */
#main { height: 200px; position: relative; width: 200px; margin: 15px; line-height: 200px; text-align: center; background: #cccccc;  }
#div1,#div2,#div3,#div4 { position: absolute; height: 50px; width: 50px; line-height: 50px; text-align: center; color: white; font-weight: bold; }
#div1 { top: 0; left: 0; background: green; }
#div2 { top: 0; right: 0; background: blue; }
#div3 { bottom: 0; right: 0; background: purple; }
#div4 { bottom: 5%; left: 2.5%; width: 95%; position: fixed; background: red; }

</pre>
<p>Now let&#8217;s talk about this for a little bit. First, the <em>#main <strong>div</strong></em> has to have <strong><em>relative positioning</em></strong> so that <em>div1, div2, </em>and <em>div3</em> are <strong><em>positioned</em></strong> within the <em>main div </em>(as you see in the top image).</p>
<p>And here&#8217;s the main part of this tutorial. Notice how <em>div4 </em>is styled with <strong><em>fixed positioning</em></strong>. I made it&#8217;s width 95% of the <em>page width</em>, so it&#8217;s <strong><em>fluid </em></strong>and changes with the width of the page. I also made it <strong><em>horizontally centered</em></strong> by giving it a <em>left-margin</em> of 2.5% of the page (so that the <em>left</em> has 2.5% margin and the <em>right</em> has 2.5%. If you do the math, 2.5% + 2.5% + 95% = 100%). Further, as you can see, the <strong><em>fixed positioned items</em></strong> do not matter where they are coded within the page. What does this mean?</p>
<p>It means that even though <em>div4</em> is wrapped within the <em>main</em> div and the <em>main</em> div is <strong><em>relatively positioned</em></strong>, the <strong><em>fixed positioned</em></strong> <em>div4</em> is still positioned <strong><em>fixed</em></strong><em> to the page</em>. Take a look at the below screenshots:</p>
<p><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson20-1.png"><img class="alignleft size-medium wp-image-213" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson20-1-183x300.png" alt="" width="183" height="300" /></a><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson20-2.png"><img class="alignleft size-medium wp-image-214" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson20-2-233x300.png" alt="" width="233" height="300" /></a><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson20-3.png"><img class="aligncenter size-medium wp-image-215" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson20-3-144x300.png" alt="" width="144" height="300" /></a></p>
<p>The only difference between the top three pictures is how I large I made my browser (my viewing page). See how no matter how the page is oriented, the <strong><em>sticky footer</em></strong> is <em>always always always</em> with respect to the page <strong><em>rather than</em></strong> to the <em>div</em> it&#8217;s coded into. It&#8217;s <em>always</em> located at the bottom part of the page. That&#8217;s the beauty of <strong><em>fixed positioning</em></strong>.</p>
<p><strong>Summary</strong></p>
<p>This post/<em>tutorial</em> concludes our tour of <strong><em>CSS positioning</em></strong>. We first started with <strong><em>in-line </em></strong><em>anchor links</em>. We moved on to <em><strong>floats</strong></em>. From <em>floats</em>, we discussed the beauty and unbelievable advantages of <em><strong>absolute positioning</strong></em>, and finally, today, we conclude with <em><strong>fixed positioning</strong></em>. We&#8217;re almost done with this whole journey. We now enter the crazy good stuff of actually designing websites that are stylish, compatible, and fun, so hang on!</p>
<p>Hope you enjoyed it Be sure to subscribe to the RSS feed so you can get    the new post by            email (via the RSS feed link or through the    Email RSS Subscription    in  the sidebar on the right).  Also, feel    free to <a title="Contact me directly to my email!" href="mailto:contact@engineercreativity.com">contact me</a> with any   questions, or use    my <a href="../../#contact">contact form</a> to send me any private comments, suggestions, price quotes, job offers,      feedback or just a plain “hi!”. Finally, make sure to check out <a title="Amit's webdesign portfolio" href="../../portfolio.html">my portfolio</a> to see my latest work.</p>
]]></content:encoded>
			<wfw:commentRss>http://engineercreativity.com/learning-xhtml-and-css-day-20-of-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning xHTML and CSS &#8211; day 19 of 30</title>
		<link>http://engineercreativity.com/learning-xhtml-and-css-day-19-of-30/</link>
		<comments>http://engineercreativity.com/learning-xhtml-and-css-day-19-of-30/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 13:09:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[course]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[free course]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[screecast]]></category>
		<category><![CDATA[screencast tutorial]]></category>
		<category><![CDATA[Stylesheets]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[video tutorial]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://engineercreativity.com/blog/?p=205</guid>
		<description><![CDATA[Until now we've discussed in-line elements (such as link anchors), floating elements (such as list items), and today we'll discuss absolutely positioned elements. The theory and advantage behind absolute positioned elements is that you have complete control on where you want to place them (to the nearest pixel). Today's post is special in that it contains both a screencast tutorial as well as a written tutorial, and from today, you'll learn everything you ever wanted to know about CSS absolute positioning.]]></description>
				<content:encoded><![CDATA[<div id="tweetbutton205" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-19-of-30%2F&amp;text=Learning%20xHTML%20and%20CSS%20%26%238211%3B%20day%2019%20of%2030&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Fengineercreativity.com%2Flearning-xhtml-and-css-day-19-of-30%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://engineercreativity.com/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p><strong><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson19.1.png"><img class="alignleft size-medium wp-image-207" title="lesson19.1" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson19.1-230x300.png" alt="" width="230" height="300" /></a>Learning xHTML and CSS &#8211; day 19 of 30</strong></p>
<p><em>Everything you wanted to know about CSS <strong>absolute positioning</strong></em></p>
<p>Until now we&#8217;ve discussed in-line elements (such as <em>link <strong>anchors</strong></em>), floating elements (such as <strong><em>list items</em></strong>), and today we&#8217;ll discuss <em><strong>absolutely positioned </strong></em>elements. The theory and advantage behind <strong><em>absolute positioned </em></strong>elements is that you have <em>complete </em>control on where you want to place them (to the nearest <em>pixel</em>). Today&#8217;s post is special in that it contains both a screencast tutorial as well as a written tutorial, and from today, you&#8217;ll learn <em>everything you ever wanted to know about </em><strong><em>CSS absolute positioning.</em></strong></p>
<p>From this part on you have three options:</p>
<ol>
<li>You can watch the video and that&#8217;s it</li>
<li>You can watch the video and continue reading</li>
<li>You can skip the video and read the tutorial</li>
</ol>
<p>I highly recommend both watching the screencast and reading the tutorial as I&#8217;m sure you&#8217;ll grasp a lot more by reading rather than by watching.</p>
<p style="text-align: center;"><strong><em>CSS absolute positioning explained from scratch</em></strong></p>
<p><iframe src="http://player.vimeo.com/video/14207623" width="400" height="225" frameborder="0"></iframe></p>
<p><em>The theory behind absolutely positioned items</em></p>
<p>So what&#8217;s actually taking place? You start with a<em> main <strong>div</strong></em> like so:</p>
<pre>&lt;div id="main"&gt;
&lt;/div&gt;
</pre>
<p>Now, in this <strong><em>div</em></strong> we input a little content. First let&#8217;s write a small phrase to indicate that we&#8217;re looking at the main <strong><em>div</em></strong>, then let&#8217;s add four more <strong><em>divs</em></strong> that will later be absolutely positioned within the <em>main</em> div. So, in short, accomplish this:</p>
<ul>
<li>Indicate the main div as the <em>MAIN CONTENT DIV</em></li>
<li>Input four additional divs with <strong><em>id&#8217;s</em></strong> of <em>div1, div2, div3, and div4</em></li>
<li>Indicate those divs with 1, 2, 3, 4</li>
</ul>
<p>So your xHTML should look like this:</p>
<pre>&lt;div id="main"&gt;
 MAIN CONTENT DIV
 &lt;div id="div1"&gt;1&lt;/div&gt;
 &lt;div id="div2"&gt;2&lt;/div&gt;
 &lt;div id="div3"&gt;3&lt;/div&gt;
 &lt;div id="div4"&gt;4&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>See how we inputted four more divs into the <em>main</em> div?</p>
<p>Now, let&#8217;s input that into the appropriate location of our main <strong><em>xHTML</em></strong> document that we&#8217;ve been working with, open it with our favorite browser, refresh, and let&#8217;s see the result.</p>
<p><em>The xHTML</em></p>
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;

&lt;head&gt;
&lt;title&gt;My first website&lt;/title&gt;
&lt;link href="reset.css" rel="stylesheet" type="text/css" /&gt;
&lt;link href="styles.css" rel="stylesheet" type="text/css" /&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;div id="pagewrap"&gt;
 &lt;div id="header"&gt;
 &lt;h1&gt;My first website!&lt;/h1&gt;
 &lt;/div&gt;

 &lt;div id="content"&gt;
 &lt;ul id="nav"&gt;
 &lt;li&gt;&lt;a href="index.html"&gt;home&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="about.html"&gt;about me&lt;/a&gt;&lt;/li&gt;
 &lt;li&gt;&lt;a href="contact.html"&gt;contact me&lt;/a&gt;&lt;/li&gt;
 &lt;/ul&gt;

 &lt;/div&gt;

 &lt;div id="main"&gt;
 MAIN CONTENT DIV
 &lt;div id="div1"&gt;1&lt;/div&gt;
 &lt;div id="div2"&gt;2&lt;/div&gt;
 &lt;div id="div3"&gt;3&lt;/div&gt;
 &lt;div id="div4"&gt;4&lt;/div&gt;
 &lt;/div&gt;    

 &lt;div id="footer"&gt;
 &lt;p&gt;This is our footer section&lt;/p&gt;
 &lt;/div&gt;
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;

</pre>
<p>Which leads us to this result:</p>
<p><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson19-2.png"><img class="alignleft size-full wp-image-206" title="lesson19-2" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson19-2.png" alt="" width="236" height="159" /></a>Now we need to add a little style to these <strong><em>divs</em></strong>. So let&#8217;s apply the following styles:</p>
<ul>
<li>Make the <em>main</em> div have a height and width of 200 pixels, centered text, bolded, and background-color of #cccccc</li>
<li>Make each of the four <strong><em>divs</em></strong> have width and height of 50 pixels, centered text, bolded, white.</li>
</ul>
<p>The CSS you should&#8217;ve come up with is the following:</p>
<pre>

#main { height: 200px; width: 200px; margin: 15px; line-height: 200px; text-align: center; background: #cccccc;  }
#div1,#div2,#div3,#div4 { height: 50px; width: 50px; line-height: 50px; text-align: center; color: white; font-weight: bold; }

</pre>
<p>Now, before I show you a screenshot of that, let&#8217;s apply some necessary additions to our CSS:</p>
<ul>
<li>Give the <em>main div</em> relative positioning</li>
<li>Give the <em>four divs</em> absolute positioning</li>
</ul>
<p>What&#8217;s the reasoning behind that? Well, if you absolutely position items, they almost always should be absolutely positioned within a <strong><em>relatively positioned</em></strong> item. Why&#8217;s that? Because then the <em><strong>absolutely positioned items </strong></em>are positioned relative to the <strong><em>relatively positioned</em></strong> item. I know this all sounds really really confusing. But we&#8217;ll see examples of this later with the <em>main div</em> having <strong><em>relative</em></strong> and <strong><em>absolute</em></strong> positioning.</p>
<p>So, the final CSS you should get is:</p>
<pre>

#main { position: relative; height: 200px; width: 200px; margin: 15px; line-height: 200px; text-align: center; background: #cccccc;  }
#div1,#div2,#div3,#div4 { position: absolute; height: 50px; width: 50px; line-height: 50px; text-align: center; color: white; font-weight: bold; }

</pre>
<p>Easy so far, right? Okay. Now let&#8217;s take a look at the result:</p>
<p style="text-align: center;"><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson19-3.png"><img class="size-medium wp-image-208 aligncenter" title="lesson19-3" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson19-3-221x300.png" alt="" width="221" height="300" /></a></p>
<p style="text-align: left;">I&#8217;ve highlighted the &#8217;4&#8242; so you can see where it&#8217;s currently located. You see, it&#8217;s showing up in the footer. Why? Because it&#8217;s <strong><em>absolutely positioned</em></strong>, yet we didn&#8217;t tell it <em>where</em> to be <em>positioned</em>.</p>
<p style="text-align: left;">So let&#8217;s do that now.</p>
<ul>
<li>Make <em>div1</em> positioned top left with background green</li>
<li>Make <em>div2</em> positioned top right with background blue</li>
<li>Make <em>div3</em> positioned bottom right with background purple</li>
<li>Make <em>div4 </em>positioned bottom left with background red</li>
</ul>
<p>The final CSS you should have is:</p>
<pre>

#main { position: relative; height: 200px; width: 200px; margin: 15px; line-height: 200px; text-align: center; background: #cccccc;  }
#div1,#div2,#div3,#div4 { position: absolute; height: 50px; width: 50px; line-height: 50px; text-align: center; color: white; font-weight: bold; }
#div1 { top: 0; left: 0; background: green; }
#div2 { top: 0; right: 0; background: blue; }
#div3 { bottom: 0; right: 0; background: purple; }
#div4 { bottom: 0; left: 0; background: red; }

</pre>
<p>And finally, the entire page CSS is:</p>
<pre>

body { background-color: white; font-size: 12px; }
a { color: red; font-size: 12px; text-decoration: none; }
a:hover { color: blue; text-decoration: underline; }
h1 { font-size: 20px; border-bottom: solid 2px orange; }
#header { height: 30px; }
#navigation { height: 20px; }
#content { height: 20px; }
#footer { height: 20px; border-top: dotted 1px black;  }

/* NEW STYLES FOR NAVIGATION */
#nav li {
list-style-type: none;
float: left;
margin-left: 10px;
}
#nav li a {
padding: 2px 10px;
border: solid 1px black;
}
#nav li a:hover {
background-color: orange;
}

/* NEW STYLES for absolute positioning */
#main { position: relative; height: 200px; width: 200px; margin: 15px; line-height: 200px; text-align: center; background: #cccccc;  }
#div1,#div2,#div3,#div4 { position: absolute; height: 50px; width: 50px; line-height: 50px; text-align: center; color: white; font-weight: bold; }
#div1 { top: 0; left: 0; background: green; }
#div2 { top: 0; right: 0; background: blue; }
#div3 { bottom: 0; right: 0; background: purple; }
#div4 { bottom: 0; left: 0; background: red; }

</pre>
<p>And the result (also shown in the first picture) is:</p>
<p><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson19.11.png"><img class="aligncenter size-medium wp-image-209" title="lesson19.1" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson19.11-230x300.png" alt="" width="230" height="300" /></a>As you can see, those divs are <strong><em>absolutely positioned</em></strong> within the MAIN CONTENT div.</p>
<p>One last thing. Suppose we remove the following CSS style for the main div:</p>
<pre>position: relative;
</pre>
<p>So it&#8217;s no longer relatively positioned. Where do you suppose div 1-4 will be positioned? If you guessed relative to the <em>body</em> of the page, then you were right. Take a look:</p>
<p><a href="http://engineercreativity.com/wp-content/uploads/2010/08/lesson19-4.png"><img class="aligncenter size-medium wp-image-210" title="lesson19-4" src="http://engineercreativity.com/wp-content/uploads/2010/08/lesson19-4-240x300.png" alt="" width="240" height="300" /></a></p>
<p>See how they&#8217;re at the corners of the actual <em>body</em> of the page, rather than relative to the <em>main div</em>? That&#8217;s the beauty of <em>relative </em>and <em>absolute</em> positioning!</p>
<p><strong>Summary</strong></p>
<p>Today we learned about <strong><em>absolute positioning</em></strong>. You now know that absolutely positioned items <em>need </em>(or most often are) within relatively positioned items. And with this, we conclude our tour of <strong><em>CSS positioning</em></strong>.</p>
<p>Hope you enjoyed it Be sure to subscribe to the RSS feed so you can get   the new post by            email (via the RSS feed link or through the   Email RSS Subscription    in  the sidebar on the right).  Also, feel   free to <a title="Contact me directly to my email!" href="mailto:contact@engineercreativity.com">contact me</a> with any   questions, or use    my <a href="../../#contact">contact form</a> to send me any private comments, suggestions, price quotes, job offers,     feedback or just a plain “hi!”. Finally, make sure to check out <a title="Amit's webdesign portfolio" href="../../portfolio.html">my portfolio</a> to see my latest work.</p>
]]></content:encoded>
			<wfw:commentRss>http://engineercreativity.com/learning-xhtml-and-css-day-19-of-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
