<?xml version="1.0" encoding="UTF-8"?><rss version="2.0">
<channel>
<title>CSS</title>
<link>http://www.computersight.com/tags/CSS</link>
<description>New posts about CSS</description>
<item>
<title>HTML Tutorial III : Hyperlinking for Dummies</title>
<link>http://www.computersight.com/Programming/HTML/HTML-Tutorial-III--Hyperlinking-for-Dummies.321217</link>
<description>
<![CDATA[<p><strong>Tip:</strong>&amp;nbsp;It might be helpful to&amp;nbsp;read <a href="http://www.computersight.com/Programming/HTML/HTML-Tutorial-1-HTML-Basics.320199" target="_blank">HTML Tutorial I: HTML Basics</a>, and HTML Tutorial II:&amp;nbsp;Basic Structure of an HTML&amp;nbsp;Webpage&amp;nbsp;before this.</p>
<p>First of all, why would anyone want to use HTML coding? The answer is simple. Have you ever wanted to design a webpage/website, or anything to that effect, but couldn't for the life of you figure out how?</p>
<p>A website's content is mainly derived from HTML coding. From text to fonts to hyperlinks, all of it can be done with HTML. So without further ado, here is a quick tutorial.</p>
<p><strong>Tip:</strong> When you happen to see tips like this one, read them carefully. If you don't it might not be very easy to understand.</p>
<p><strong>IMPORTANT!!:</strong>&amp;nbsp;Since using a code with brackets &amp;gt;, and &amp;lt; actually does something in this document, I'll use these: {, and}. In this Tutorial, please replace all { and } characters with &amp;gt; and &amp;lt; in your HTML documents.</p>
<p><strong>HyperLinks:</strong> links anchored in a certain word or selection that when clicked take you to another webpage or site. An example, and the code used is: {a href="http://www.yourwebsite.com/the/rest/of/your/link.php"}Stuff{/a} The link here would appear as: {a href="http://www.yourwebsite.com/the/rest/of/your/link.php"}Stuff{/a}</p>
<p>If you happen to want the link to take them to the webpage/site on another window, as to leave yours up, use the target command, target="_blank" With the target=blank command, the HTML code should look similar to this: {a href="http://www.yourwebsite.com/the/rest/of/your/link.php"target="_blank"}Stuff{/a} There are two different types of URLs you can use to link to various pages, absolute and relative.</p>
<p><strong>Absolute URLs</strong></p>
<p>Absolute URLs include the complete path to the file&amp;rsquo;s location, including the names of all the directories and subdirectories.</p>
<p>Let&amp;rsquo;s say you have a folder inside your web site's root directory called "music" and you want to link to a page inside the "music" folder called brahms.html. The absolute URL is:{a href="http://www.yoursite.com/music/brahms.html"}Brahms{/a}</p>
<p><strong>Relative URLs</strong></p>
<p>If you don&amp;rsquo;t want to ever have to worry about going back and editing your hyperlinks if your site structure changes then relative URLs are the way to go. Relative URLs are more or less like shorthand that tells the browser to go backward one or more directories to find the file.</p>
<p>Let's say you're on the page we referenced above, brahms.html (located in the "music" folder) and you want to link back to the home page: (<a href="http://www.yoursite.com/index.html" target="_blank">http://www.yoursite.com/index.html</a>) Using a relative URL, you would tell the browser to go back 1 directory by using the dot-slash method. {a href="../index.html"}Home{/a}</p>
<p>The two dots followed by a slash instructs the browser to go up 1 more level to get to the main (root) directory.</p>
<p><strong>Changing the Hyperlink Colors</strong></p>
<p>The default color for hyperlinks on an HTML page is blue, but you can change it to whatever color you'd like by using the link code inside the {body} tag. Here's an example: {body link="green" vlink="yellow" alink="purple"}</p>
<p>In the above example, hyperlinks will be green, links that have already been visited will be yellow and active links will be purple. (An active link is one that has just been clicked, so for a split second the link will change colors as the mouse activates it).</p>
<p><strong>Creating Email Links</strong></p>
<p>Creating email links are just as simple. All you need is the "mailto" function to get this to work properly: {a href="mailto:youraddress@email.com"}Email Me{/a}</p>
<p><strong>Anchor Links</strong></p>
<p>If you want to create a link that will take the visitor to another section of the same page (rather than a new page or site), then you can create an anchor link. There are two steps to this process:</p>
<p>1) First, go to the place in your HTML code where you want the anchor to go. This is the spot on the page that the browser will move to when a person clicks on the link. Insert the code {a name="name1"}This is the Text Where the Anchor Will Land{/a} "name1" is just the name of the anchor I chose. You can all it anything you want.</p>
<p>2) Now to link to that section of the page, use the hyperlink code: {a href="#name1"}click here{/a}</p>
<p>And that's it for Hyperlinking!</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FHTML%2FHTML-Tutorial-III--Hyperlinking-for-Dummies.321217"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FHTML%2FHTML-Tutorial-III--Hyperlinking-for-Dummies.321217" border="0"/></a>]]></description>
<pubDate>Thu, 30 Oct 2008 05:10:07 PST</pubDate></item>
<item>
<title>HTML Tutorial II : Basic Structure of an HTML Webpage</title>
<link>http://www.computersight.com/Programming/HTML/HTML-Tutorial-II--Basic-Structure-of-an-HTML-Webpage.321211</link>
<description>
<![CDATA[<p><strong>Tip:</strong> Please read <a href="http://www.computersight.com/Programming/HTML/HTML-Tutorial-1-HTML-Basics.320199" target="_blank">HTML Tutorial I: HTML Basics</a> before this.</p>
<p>First of all, why would anyone want to use HTML coding? The answer is simple. Have you ever wanted to design a webpage/website, or anything to that effect, but couldn't for the life of you figure out how?</p>
<p>A website's content is mainly derived from HTML coding. From text to fonts to hyperlinks, all of it can be done with HTML. So without further ado, here is a quick tutorial.</p>
<p><strong>TIP:</strong> When you happen to see tips like this one, read them carefully. If you don't it might not be very easy to understand.</p>
<p><strong>IMPORTANT!!:</strong> Since using a code with brackets &amp;gt;, and &amp;lt; actually does something in this document, I'll use these: {, and}. In this Tutorial, please replace all &amp;gt; and &amp;lt; characters with { and { in your HTML documents.</p>
<h3>Basic Structure of an HTML Page:</h3>
<p>To start of an HTML webpage, put in the {html} tag. This tells your web browser where the HTML starts. This tag is optional, and it isn't necessary to get your page to show. The second line would be {head}, to start the heading, which includes title, the description (read by some search engines), and the keywords (the main keywords of the page).</p>
<p>The next tag would be the {title} tag. This is the title of the page, and what you'll see at the top of the web browser. The {meta name} information is also somewhat useful for some search engines. They may use whatever is in your "description" tag to describe your site. Others may randomly take an excerpt of the {body} of your page for a description of your site. The keyword tag may also be helpful with your ranking in some engines. Insert three or four of your main keywords or keyword phrases separated by commas here. Then close the head section with {/head}</p>
<p>Next comes {body}. This should include the main body of your page. After typing your main body, close it with {/body&amp;gt; Then close the HTML with {/html}.</p>
<p>Here&amp;rsquo;s what it should look like when complete:</p>
<p>{html}</p>
<p>{head}</p>
<p>{title} Title that is displayed at the top of your web browser and also used as the title by many search engines{/title}</p>
<p>{meta name="description" content="10-15 word description of your site read by some search engines"&amp;gt;</p>
<p>{/head}</p>
<p>{body}</p>
<p>{p align="left"}</p>
<p>Website body paragraph text, you write stuff here. {a href="http://www.yourwebsite.com/the/rest/of/your/link.php{/a}.</p>
<p>{/p}</p>
<p>{/body}</p>
<p>{/html}</p>
<p>This may be a little sparse, but there's more in the next tutorial.</p>
<p>*Tutorial III will cover Basic Hyperlinking*</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FHTML%2FHTML-Tutorial-II--Basic-Structure-of-an-HTML-Webpage.321211"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FHTML%2FHTML-Tutorial-II--Basic-Structure-of-an-HTML-Webpage.321211" border="0"/></a>]]></description>
<pubDate>Thu, 30 Oct 2008 05:08:12 PST</pubDate></item>
<item>
<title>HTML Tutorial 1: HTML Basics</title>
<link>http://www.computersight.com/Programming/HTML/HTML-Tutorial-1-HTML-Basics.320199</link>
<description>
<![CDATA[<p>First of all, why would anyone want to use HTML coding? The answer is simple. Have you ever wanted to design a webpage/website, or anything to that effect, but couldn't for the life of you figure out how?</p>
<p>A website's content is mainly derived from HTML coding. From text to fonts to hyperlinks, all of it can be done with HTML. So without further ado, here is a quick tutorial.</p>
<p><strong>TIP:</strong> When you happen to see tips like this one, read them carefully. If you don't it might not be very easy to understand.</p>
<p><strong>IMPORTANT!!:</strong>&amp;nbsp;Since using a code with brackets &amp;gt;, and &amp;lt; actually does something in this document, I'll use these: {, and}. In this Tutorial, please replace all { and } characters with &amp;gt; and &amp;lt; in your HTML documents.</p>
<h3>HTML Basics</h3>
<p>Before I get started, you should know that HTML code almost always uses beginning and ending tags. These tags surround the text that will be affected by the code. A beginning tag is almost always surrounded by brackets, ex. {B} A closure tag is surrounded by brackets, but has a forward slash right after the beginning bracket, ex. {/B} A beginning tag, as the name suggests, goes before the selection you wish to apply the command to. The closure bracket, therefore, goes at the end of the selection.</p>
<p>An example would be: Say you want to bold a section of a sentence, you'd use for the beginning tag, and for the ending tag. Let's say you want to bold the words Good day! in the sentence below. You're HTML code would be: {B}Good day!{/B} My name is Greg! The result would be: Good day! My name is Greg! Only the word "Hello!" is bolded because the tags surround that word. If you wanted to bold the entire sentence, then you would have put the closure tag, , after the word &amp;ldquo;Greg&amp;rdquo;. Be sure to always include your closing tag because if you forget, your entire page will be affected by the tag.</p>
<p>You can apply this same idea to many other HTML codes. Here are some of the basics...</p>
<h3>Basic Font Tags</h3>
<p><strong>Bold: {B} and {/B}</strong></p>
<p>Underline: {u} and {/u}</p>
<p>Italics: {i} and {/i}</p>
<p>Change text color: {font color="red"} The ending for any font tag is {/font}</p>
<p>If you want more colors, you can also use <a href="%20/%20colors" target="_blank">hex codes</a>.</p>
<h3>Basic Alignment Tags</h3>
Centering text: {center}&amp;nbsp;and {/center}
<p>Left aligning text: {p align="left"} Just use {/p} for the closing tag</p>
<p>Right aligning text: {p align="right"} Just use {/p} for the closing tag</p>
<blockquote>Indentation: To indent your text about an inch to the right, simply use the open and closing {blockquote} tag around the text you want to indent.&amp;nbsp;</blockquote>
<p>{blockquote} -Indented text- {/blockquote}</p>
<p><strong>TIP:</strong> In another attempt to have the tutorial come out in a comprehendable manner, please replace all * in the chart below with &amp;amp; in your own HTML documents.</p>
<h3>Special Tags</h3>
<table border="0" cellspacing="0" cellpadding="12" width="624">
<tbody>
<tr>
<td width="15%" height="23">
<p>Code</p>
</td>
<td width="15%" height="23">
<p>Symbol</p>
</td>
<td width="70%" height="23">
<p>Description</p>
</td>
</tr>
<tr>
<td width="15%" height="23">
<p>*trade;</p>
</td>
<td width="15%" height="23">
<p>&amp;trade;</p>
</td>
<td width="70%" height="23">
<p>Trademark</p>
</td>
</tr>
<tr>
<td width="15%" height="23">
<p>*amp;</p>
</td>
<td width="15%" height="23">
<p>&amp;amp;</p>
</td>
<td width="70%" height="23">
<p>Ampersand</p>
</td>
</tr>
<tr>
<td width="15%" height="23">
<p>*reg;</p>
</td>
<td width="15%" height="23">
<p>&amp;reg;</p>
</td>
<td width="70%" height="23">
<p>Registered trademark</p>
</td>
</tr>
<tr>
<td width="15%" height="23">
<p>*copy;</p>
</td>
<td width="15%" height="23">
<p>&amp;copy;</p>
</td>
<td width="70%" height="23">
<p>Copyright</p>
</td>
</tr>
<tr>
<td width="15%" height="23">
<p>*dagger;</p>
</td>
<td width="15%" height="23">
<p>&amp;dagger;</p>
</td>
<td width="70%" height="23">
<p>Dagger</p>
</td>
</tr>
<tr>
<td width="15%" height="23">
<p>*raquo;</p>
</td>
<td width="15%" height="23">
<p>&amp;raquo;</p>
</td>
<td width="70%" height="23">
<p>Right pointing double angle quotation mark</p>
</td>
</tr>
<tr>
<td width="15%" height="23">
<p>*laquo;</p>
</td>
<td width="15%" height="23">
<p>&amp;laquo;</p>
</td>
<td width="70%" height="23">
<p>Left pointing double angle quotation mark</p>
</td>
</tr>
<tr>
<td width="15%" height="23">
<p>*#151;</p>
</td>
<td width="15%" height="23">
<p>&amp;mdash;</p>
</td>
<td width="70%" height="23">
<p>Em-dash</p>
</td>
</tr>
<tr>
<td width="15%" height="23">
<p>*deg;</p>
</td>
<td width="15%" height="23">
<p>30&amp;deg;</p>
</td>
<td width="70%" height="23">
<p>Degree</p>
</td>
</tr>
<tr>
<td width="15%" height="21">
<p>*frac14;</p>
</td>
<td width="15%" height="21">
<p>&amp;frac14;</p>
</td>
<td width="70%" height="21">
<p>Quarter</p>
</td>
</tr>
<tr>
<td width="15%" height="23">
<p>*frac12;</p>
</td>
<td width="15%" height="23">
<p>&amp;frac12;</p>
</td>
<td width="70%" height="23">
<p>Half</p>
</td>
</tr>
<tr>
<td width="15%" height="23">
<p>*frac34;</p>
</td>
<td width="15%" height="23">
<p>&amp;frac34;</p>
</td>
<td width="70%" height="23">
<p>Three quarters</p>
</td>
</tr>
<tr>
<td width="15%" height="23">
<p>*middot;</p>
</td>
<td width="15%" height="23">
<p>&amp;middot;</p>
</td>
<td width="70%" height="23">
<p>Middle dot</p>
</td>
</tr>
<tr>
<td width="15%" height="23">
<p>*iexcl;</p>
</td>
<td width="15%" height="23">
<p>&amp;iexcl;</p>
</td>
<td width="70%" height="23">
<p>Inverted exclamation mark</p>
</td>
</tr>
</tbody>
</table>
<p>&amp;nbsp;*The next Tutorial will cover the Basic Structure of an HTML Page*</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FHTML%2FHTML-Tutorial-1-HTML-Basics.320199"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FHTML%2FHTML-Tutorial-1-HTML-Basics.320199" border="0"/></a>]]></description>
<pubDate>Wed, 29 Oct 2008 08:57:45 PST</pubDate></item>
<item>
<title>Web Journal: My Indoctrination Into Computers &amp; the World Wide Web</title>
<link>http://www.computersight.com/Programming/HTML/Web-Journal-My-Indoctrination-Into-Computers--the-World-Wide-Web.203853</link>
<description>
<![CDATA[<p>&amp;nbsp;</p>
<h3>The information superhighway</h3>
<p>My first computer was a <a href="http://oldcomputers.net/vic20.html" target="_blank">VIC-20</a>, by Commodore. This was maybe in 1983? It was just a clunky keyboard that interfaced with my mom's floor model television via a formidable-looking "alligator clip" that visually was more suited for automotive jumper cables.</p>
<p>When attached to the two screws on the back of the television set marked &amp;ldquo;VHF&amp;rdquo;, my computer occasionally had a "color monitor" of just 16 colors.</p>
<p>Despite her initial protestations and concerns of this hybrid set up "&amp;hellip;possibly damaging the television", I got fare time with the device. I was quite satisfied with my so-called computer. I could not envision much beyond the mystery of this machine and the language it spoke. I could play pre-packaged games that came as a small square "cassettes" that plugged into the back of the keyboard.</p>
<p>A game called <a href="http://en.wikipedia.org/wiki/Battle_Chess" target="_blank">Battle Chess</a> was my all-time favorite, especially when I added a "joystick" to enhance my ability to interact with the Chess characters. I usually lost the game, but it was fun anyway</p>
<p>I learned a bit of <a href="http://en.wikipedia.org/wiki/BASIC_programming_language" target="_blank">B.A.S.I.C.</a> language in which I could make a small <a href="http://en.wikipedia.org/wiki/ASCII" target="_blank">ASCII</a> "stick-man" character on-screen do jumping jack exercises. Faster or slower this character would jump, based upon the number of times I coded the "For/Next" loop to execute before the next "If/Then' statement. This was about the extent of my "programming abilities"</p>
<p>In the very early 90's I attended a brief (10-week long?) one-night-per-week Adult Education Course for Programming in BASIC. I did okay with it, I sort-of "got it". I passed the class near the top. But I could only see one thing for the future...-yeah, I'd need a better computer.</p>
<h3>Say, isn't that one of those new-fangled MOS 6510 processors?</h3>
<p>I next bought a used <a href="http://en.wikipedia.org/wiki/Commodore_64" target="_blank">Commodore_64</a> computer, which was okay for about a year. I knew of a few "bulletin boards" and something called "telnet, and could possibly have connected to and send/read messages.</p>
<p>In 1985 or "86maybe, I "upgraded" to a new <a href="http://www.old-computers.com/MUSEUM/computer.asp?c=21" target="_blank">ATARI 130XE</a> but without a modem I still could not access anything beyond pre-canned programs on mini-cassette. I wanted to exchange a few e-notes with friends met at science fiction conventions whom spoke of this "telnet" thing, but my system without peripheral upgrades would not support it. I did however, very much enjoy a "game" called &amp;ldquo;<a target="_blank"></a><a target="_blank"></a><a href="http://en.wikipedia.org/wiki/The_Halley_Project" target="_blank">The Halley Project</a> &amp;rdquo; and while I never attained the end of the game and subsequently found the hidden so-called "Easter Egg" Extended Game Play that was said to exist, I much enjoyed this game.</p>
<p>The "IBM-PC" was the golden standard, so next came my first "real" computer, a <a href="http://en.wikipedia.org/wiki/Tandy_1000" target="_blank">TANDY 1000 RLX</a> computer by Radio Shack.</p>
<p>-Yeah, -mistakes come in threes I'm afraid&amp;hellip;*grin*. Enough said!</p>
<p>While I was doing this, the Internet as we know it was quite ready to be born. There might have been quite a few telnet bulletin boards out there by now, linking together, encompassing larger areas of lay-users. The emergence of "backbone" companies such as <a href="http://en.wikipedia.org/wiki/AOL" target="_blank">America Online</a> and <a href="http://en.wikipedia.org/wiki/CompuServe" target="_blank">CompuServe</a> brought "internet" to the masses. Physical landlines were being strung by companies like Sprint, which were to be integral to the Internet boom about to emerge. From what had begun as a Professionals-users-only Old-boys club, emerged something the World had never expected, The <a href="http://en.wikipedia.org/wiki/World_Wide_Web" target="_blank">World Wide Web</a>. A "critical mass" of would-be users had been achieved, the ribbon was unceremoniously cut and a Information Superhighway we call "The Internet" exploded forth as many thousands of users joined in that first year alone with exponentially more every year since.</p>
<p>I had joined the emerging "internet" circa early 1994 with a program called PC_LINK" (not to be confused with a business that was later created in the late 1990s with the same name) on my new computer with a "i186" and 14.4kbs modem. I found a way to tweak this from the bench-tester's 14.4-baud speed to 19.2-baud. This was still quite slow, really.</p>
<p>An aftermarket modem upgrade to a 28.8-kbs helped. A few years later, I had to upgrade yet again, to a COMPAQ Presario with "i586" with the optimum dial-up standard, the 56-kbs modem. And still, the Internet demanded more and more of computers. Today I use a used-to-be-HP with AMD-K6, tricked-out with added-on peripherals, and can barely keep up with the changes!</p>
<p>Still, my biggest personal pet peeve was that Personal Web-Pages take so long to load on dial-up! Why? I learned that there are "tricks" a conscientious Web-page programmer can do to assist users of "slower" computers. -Better coding.</p>
<h3>Road signs to Guide You</h3>
<p>Codified thought... I wanted to learn even just a little bit of how to write HTML. How to change the color of my text posted upon a Forum, or how to use a different font or emphasis... -That would do. But learning how to write Web Pages seemed impossible! On "forums" I would edit my replies to include little things gleaned like colored text, altered text sizes, and other styles of font. I wrote down what worked, what it does. I needed the skills to write my own pages.</p>
<h3>So, how about writing your own code?</h3>
<p>It was about seven years ago I began to learn through online resources and later, signed up via Internet classes with Distance Education Course and made it through several courses on "Introduction to HTML" and "Web-Page Design w/ multi-Media". It was difficult as all new things are. I learned some basic HTML, tried it and quickly saw how sometimes what I wrote was skewed on one or the other of the two main browsers, Internet Explorer and Netscape! This is terrible! What did I do incorrectly? Was there someplace I could "test" my code for accuracy and compatibility? (YES! <a target="_blank"></a><a href="http://validator.w3.org/" target="_blank">W3C Validator</a>) -These course helped me to create web-pages... but I did not learn right away of resources like this, or where to look for pre-written (FREE would be preferred!) things such as ready-to-use code snippets, libraries of open-source images such as *GIFs, sound files, plug-ins and upgrades etc., to add value and appeal to my pages.</p>
<p>I learned about the history of the Internet, it's intricacies, some potential dangers too. The direction it is heading, how "netizens" are using it today and, more importantly for me, how to do intelligent searches that lead to meaningful finds. As a future Web Page Designer seeking to increase his personal web-presence, this resource alone was worth the time invested in these courses.</p>
<p>I have looked for and found "code validator" sites, which allows web-coders to paste their live URL's (or actual code into) to be validated for errors and/or warnings. You get a nearly immediate line-by-line review of your tested code, cited are any errors, conflicts, deprecated (discontinued/unsupported) tags, missing or improperly closed tags, bad/incorrect syntax and any other "unrecognized" errors.</p>
<p>Using this course, I have found other useful, fun sources of code, games, freebie utilities, plug-ins and archived knowledge that I *knew* must have existed, somewhere. Resources such as <a href="http://www.strangebanana.com/" target="_blank">StrangeBanana</a> that programmatically generates a new, unique X-HTML sheet for you, right before your eyes! You can "renew" the image with one click, to get one that you like! Free for you to take, follow their included instructions, and make it your own. And I located a slick collection of links to "opt out of site cookies", like (website no longer exists). Most sites do let you "opt out" of receiving their cookies. -But they usually do not advertise this openly, so most people don't even know this. This opt-out site has collected a listing of the most prolific cookie-givers, and shows you where to "opt-out" of those ads/tracking networks, by "blocking" future cookies from them with a "stale cookie", one that the visited site cannot "overwrite" or otherwise replace.</p>
<p>I feel more confident in searching for resources since having undertaken this introductory course those years ago. A course that I could have availed myself of years sooner had I know they existed and was aware of the benefits they bring. This could have saved myself many hours of fruitless searches with non-relevant returns. In earlier courses and in my own reading I have learned how to make my Web-page code degrade and still be fairly compatible and forward-looking with most current generation browsers. Recommended reading is Elizabeth Castro's <a href="http://www.amazon.com/World-XHTML-Fifth-Visual-QuickStart/dp/0321130073" target="_blank">HTML For the World Wide Web</a>. I started with the &amp;ldquo;Fourth Edition&amp;rdquo; of her excellent book. The "Fifth Edition" of this title is highly recommended. -Adding X-HTML and CSS (&amp;ldquo;Cascading Style Sheets&amp;rdquo;.) the Fifth Edition cited above is an indispensable desk side reference manual that no Web Page Builder should be without</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FHTML%2FWeb-Journal-My-Indoctrination-Into-Computers--the-World-Wide-Web.203853"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FHTML%2FWeb-Journal-My-Indoctrination-Into-Computers--the-World-Wide-Web.203853" border="0"/></a>]]></description>
<pubDate>Sun, 10 Aug 2008 02:22:59 PST</pubDate></item>
<item>
<title>CSS Animations Via Mootools</title>
<link>http://www.computersight.com/Programming/JavaScript/Css-Animations-Via-Mootools.124802</link>
<description>
<![CDATA[<pre style="width: 500px; overflow: auto;"> <br />// a cow makes moo, this script too. requires mootools 1.2b or compatible.<br />
 
// MIT-style licence<br />
 
var CssEffects = {<br />
 
prefix: "%prefix%",<br />
 
initialValues: {<br />
 
duration: "%initialDuration%",<br />
 
property: "%initialProperty%",<br />
 
transition: "%initialTransition%"<br />
 
},<br />
 
timeUnit: "%timeUnit%"<br />
 
};<br />
 
CssEffects.deprecates = (Browser.Engine.trident4) ? true : false;<br />
 
CssEffects.$regexps = {<br />
 
parserA: new RegExp('(?:s)*([^{}]+?)s*{([^}]*' + CssEffects.prefix + "[^}]*)}", "gi"),<br />
 
parserB: new RegExp(CssEffects.prefix + "(?:-?([a-z-]+))?s*:s*([^;]+?)s*(!important)?s*;", "gi"),<br />
 
time: new RegExp('d+' + CssEffects.timeUnit)<br />
 
};<br />
 
CssEffects.Durations = new Hash();<br />
 
CssEffects.Properties = new Hash();<br />
 
CssEffects.Transitions = new Hash();<br />
 
CssEffects.Element = new Class({<br />
 
initialize: function(element){<br />
 
this.element = element;<br />
 
element.store('CssEffects', this);<br />
 
this.previous = {};<br />
 
this.dynamicPseudos = [];<br />
 
this.rules = [];<br />
 
this.styleAttribute = '';<br />
 
this.saveStyleAttribute();<br />
 
this.effect = new Fx.Morph(this.element,{<br />
 
onCancel: function(){<br />
 
this.previous = this.getStyles(this.dynamicPseudos);<br />
 
}.bind(this),<br />
 
onComplete: this.element.setStyles.bind(this.element, this.previous)<br />
 
});<br />
 
(function(){<br />
 
this.previous = this.getStyles();<br />
 
element.setStyles(this.previous);<br />
 
}).delay(1, this);<br />
 
CssEffects.DynamicPseudos.each(function(obj, pseudo){<br />
 
['begin', "end"].each(function(when){<br />
 
$splat(obj[when]).each(function(event){<br />
 
element.addEvent(event, this.change.bind(this, [when, pseudo]));<br />
 
}, this);<br />
 
}, this);<br />
 
}, this);<br />
 
},<br />
 
change: function(when, pseudo){<br />
 
pseudo = pseudo || '';<br />
 
(function(){<br />
 
if (pseudo.length &amp;gt; 0){<br />
 
if (when == "end" &amp;amp;&amp;amp; !this.dynamicPseudos.contains(pseudo)) return;<br />
 
this.dynamicPseudos[(when == "begin") ? "push" : "remove"](pseudo);<br />
 
}<br />
 
this.effect.cancel();<br />
 
this.restoreStyleAttribute();<br />
 
var now = this.getStyles(this.dynamicPseudos);<br />
 
this.element.setStyles(this.previous);<br />
 
var to = Hash.filter(now, function(v, p){<br />
 
return (!$defined(this.previous[p]) || this.previous[p] != v);<br />
 
}, this);<br />
 
var duration = this.getOwnStyle('duration', this.dynamicPseudos);<br />
 
var transition = this.getOwnStyle('transition', this.dynamicPseudos);<br />
 
this.effect.options.duration = duration.match(CssEffects.$regexps.time) ? duration.toInt()<br />
 
: CssEffects.Durations.get(duration);<br />
 
this.effect.options.transition = CssEffects.Transitions.get(transition);<br />
 
this.effect.start(to);<br />
 
this.previous = now;<br />
 
}).delay(1, this)<br />
 
return this;<br />
 
},<br />
 
addRule: function(rule){<br />
 
this.rules.include(rule);<br />
 
return this;<br />
 
},<br />
 
hasRule: function(rule){<br />
 
return this.rules.contains(rule);<br />
 
},<br />
 
removeRule: function(rule){<br />
 
this.rules.erase(rule);<br />
 
return this;<br />
 
},<br />
 
getOwnStyle: function(property, dynamicPseudos){<br />
 
dynamicPseudos = dynamicPseudos || [];<br />
 
var pseudoStr = dynamicPseudos.sort().join('$');<br />
 
var rules = this.rules.filter(function(rule){<br />
 
var rulePseudoStr = rule.dynamicPseudos.sort().join('$');<br />
 
return (!rulePseudoStr || rule.values.has(property) &amp;amp;&amp;amp; pseudoStr == rulePseudoStr);<br />
 
});<br />
 
var value = CssEffects.initialValues[property];<br />
 
var importance = 0, specificity = 0;<br />
 
rules.each(function(rule){<br />
 
var mImportance = rule.importances.get(property);<br />
 
if (mImportance &amp;gt; importance || (mImportance == importance &amp;amp;&amp;amp; rule.specificity &amp;gt;= specificity)){<br />
 
importance = mImportance;<br />
 
specificity = rule.specificity;<br />
 
value = rule.values.get(property);<br />
 
}<br />
 
});<br />
 
return value;<br />
 
},<br />
 
getStyles: function (dynamicPseudos){<br />
 
var property = this.getOwnStyle('property', dynamicPseudos);<br />
 
if (property == "none") return {};<br />
 
property = (property == "all") ? CssEffects.Properties : $splat(property);<br />
 
return this.element.getStyles.apply(this.element, property);<br />
 
},<br />
 
saveStyleAttribute: function(){<br />
 
this.styleAttribute = this.element.get('style') || '';<br />
 
return this;<br />
 
},<br />
 
restoreStyleAttribute: function(){<br />
 
return this.element.set('style', this.styleAttribute);<br />
 
}<br />
 
});<br />
 
CssEffects.Element.getInstance = function(element){<br />
 
return element.retrieve('CssEffects') || new CssEffects.Element(element);<br />
 
};<br />
 
CssEffects.Parser = {<br />
 
addCss: function(text){<br />
 
while (a = CssEffects.$regexps.parserA.exec(text)){<br />
 
var selectors = a[1].split(/s*,s*/);<br />
 
rules = selectors.map(function(selector){<br />
 
return new CssEffects.Rule(selector);<br />
 
});<br />
 
while (b = CssEffects.$regexps.parserB.exec(a[2])){<br />
 
var importance = (b[3] == "!important") ? 2 : 1;<br />
 
rules.each(function(rule){<br />
 
rule.addDeclaration(b[1], b[2], importance);<br />
 
});<br />
 
}<br />
 
}<br />
 
return this;<br />
 
},<br />
 
addStylesheet: function(element){<br />
 
switch (element.get('tag')){<br />
 
case "style":<br />
 
this.addCss(element.get('html'));<br />
 
break;<br />
 
case "link":<br />
 
new Request({<br />
 
onSuccess: function(text){<br />
 
this.addCss(text);<br />
 
}.bind(this),<br />
 
url: element.href,<br />
 
method: "get"<br />
 
}).send();<br />
 
}<br />
 
return this;<br />
 
},<br />
 
processDocument: function(){<br />
 
$each(document.styleSheets, function(styleSheet){<br />
 
var element = $(styleSheet[styleSheet.ownerNode ? "ownerNode" : "owningElement"]);<br />
 
this.addStylesheet(element);<br />
 
}, this);<br />
 
return this;<br />
 
}<br />
 
};<br />
 
CssEffects.Rule = new Class({<br />
 
initialize: function(selector){<br />
 
this.importances = new Hash();<br />
 
this.values = new Hash();<br />
 
this.selector = selector.replace(/:active|:focus|:hover/ig, '');<br />
 
this.dynamicPseudos = selector.match(/(:active|:focus|:hover)/ig) || [];<br />
 
this.specificity = (function(){<br />
 
var str = selector.replace(/:(before|after|first-letter|first-line)/, '');<br />
 
var a = str.match(/#/g); a = a ? a.length : 0;<br />
 
var b = str.match(/[|:|./g); b = b ? b.length : 0;<br />
 
var c = str.match(/( |+|&amp;gt;)[a-z]+/ig); c = c ? c.length : 0;<br />
 
if (str.match(/^[a-z]+/i)) c++;<br />
 
return 100 * a + 10 * b + c;<br />
 
})();<br />
 
this.use();<br />
 
},<br />
 
addDeclaration: function(property, value, importance){<br />
 
if (!property) return this.addShortHand(value, importance);<br />
 
if (!this.importances.has(property) || this.importances.get(property) &amp;lt;= importance) {<br />
 
if (value.contains(',')) value = value.split(/s*,s*/);<br />
 
this.values.set(property, value);<br />
 
this.importances.set(property, importance);<br />
 
}<br />
 
return this;<br />
 
},<br />
 
addShortHand: function(shortHand, importance){<br />
 
shortHand.match(/([^s,]+s*,s*)+[^s,]+|[^s,]+/gi).each(function(value){<br />
 
var property = (value.match(CssEffects.$regexps.time) || CssEffects.Durations.has(value)) ? "duration"<br />
 
: (CssEffects.Transitions.has(value)) ? "transition"<br />
 
: "property";<br />
 
this.addDeclaration(property, value, importance);<br />
 
}, this);<br />
 
return this;<br />
 
},<br />
 
use: function(){<br />
 
$$(this.selector).each(function(element){<br />
 
CssEffects.Element.getInstance(element).addRule(this);<br />
 
}, this);<br />
 
}<br />
 
});<br />
 
CssEffects.DynamicPseudos = new Hash({<br />
 
":active": {<br />
 
begin: "mousedown",<br />
 
end: ['mouseup', "mouseout"]<br />
 
},<br />
 
":focus": {<br />
 
begin: "focus",<br />
 
end: "blur"<br />
 
},<br />
 
":hover": {<br />
 
begin: "mouseenter",<br />
 
end: "mouseleave"<br />
 
}<br />
 
});<br />
 
// normal:<br />
 
CssEffects.prefix = "-moofx";<br />
 
initialValues: {<br />
 
duration: "0ms",<br />
 
property: "all",<br />
 
transition: "sine-in-out"<br />
 
},<br />
 
aliases<br />
 
};<br />
 
CssEffects.Durations = new Hash({<br />
 
"short": 250,<br />
 
"normal": 500,<br />
 
"long": 750<br />
 
});<br />
 
CssEffects.Properties = ['backgroundColor', "backgroundPosition", "borderBottomColor",<br />
 
"borderBottomStyle", "borderBottomWidth", "borderLeftColor", "borderLeftStyle",<br />
 
"borderLeftWidth", "borderRightColor", "borderRightStyle", "borderRightWidth",<br />
 
"borderTopColor", "borderTopStyle", "borderTopWidth", "bottom",<br />
 
"color", "fontSize", "fontWeight", "height", "left", "letterSpacing", "lineHeight",<br />
 
"marginBottom", "marginLeft", "marginRight", "marginTop", "maxHeight", "maxWidth",<br />
 
"opacity", "paddingBottom", "paddingLeft", "paddingRight", "paddingTop", "right",<br />
 
"textIndent", "top", "width", "zIndex", "zoom"];<br />
 
CssEffects.DynamicPseudos = new Hash({<br />
 
":active": {<br />
 
begin: "mousedown",<br />
 
end: ['mouseup', "mouseout"]<br />
 
},<br />
 
":focus": {<br />
 
begin: "focus",<br />
 
end: "blur"<br />
 
},<br />
 
":hover": {<br />
 
begin: "mouseenter",<br />
 
end: "mouseleave"<br />
 
}<br />
 
});<br />
 
CssEffects.Transitions = new Hash({<br />
 
linear: Fx.Transitions.linear<br />
 
});<br />
 
['Quad', "Cubic", "Quart", "Quint", "Expo", "Circ",<br />
 
"Sine", "Back", "Bounce", "Elastic"].each(function (transition){<br />
 
['In', "Out", "InOut"].each(function (ease){<br />
 
var alias = transition.toLowerCase() + ease.hyphenate().toLowerCase();<br />
 
CssEffects.Transitions.set(alias, Fx.Transitions[transition]['ease' + ease]);<br />
 
});<br />
 
});<br />
 
window.addEvent('domready', CssEffects.Parser.processDocument.bind(CssEffects.Parser));<br />
 
})();</pre><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FJavaScript%2FCss-Animations-Via-Mootools.124802"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FJavaScript%2FCss-Animations-Via-Mootools.124802" border="0"/></a>]]></description>
<pubDate>Thu, 15 May 2008 10:57:31 PST</pubDate></item>
<item>
<title>Top 10 CSS Tricks You Should Know</title>
<link>http://www.computersight.com/Programming/C++/Top-10-CSS-Tricks-You-Should-Know.103384</link>
<description>
<![CDATA[<p>Many people are not aware of the various CSS tricks that can be done to improve and simplify your CSS commands and design methods. It is wise to take the extra time to learn these special tricks to enhance your cascading style sheet experience. There are many different available CSS tricks that you can learn. You can search online and find a host of possible tricks to quicken your CSS design pace. There is also a wide array of sources to obtain new cascading style sheet tricks. Using CSS tricks to improve your CSS skills is important to stay ontop of this growing field. There are about ten CSS tricks that regardless of your level you may not know. Learning these ten CSS tricks can be the secret to ultimate cascading style sheet success.</p>
 
<p>The ten CSS tricks that you may not know but should know are quite simple to learn.</p>
<ol>
<li>The first trick is the CSS font shorthand rule. Instead of using lines after lines of text commands you can use the CSS font shorthand rule to get the exact same results. Simply write font: lem/1.5em bold italic small-caps verdana, serif. </li>
<li>The second CSS trick is using tow classes together. You can actually use two or as many classes as you want together when writing CSS. </li>
<li>The third trick is to use CSS border default value. When writing a border rule you do not have to specify the color, style, width, and other details in order. You can simply write the border for a quick easy result. </li>
<li>The fourth clever CSS trick is to use the important command. Using !important after a command will instantly make the command take precedence over other commands. </li>
<li>The fifth CSS trick is to use the replace image technique.</li>
<li> The sixth CSS trick is to use a CSS box model hack alternative. This is used to eliminate any problem in pre-IE 6 browsers in which padding and border is involved in the width of an element. </li>
<li>The seventh CSS trick is to center aligning using a block element. You can use a specific CSS command to fix width layout of any design.</li>
<li> The eighth trick is to vertically align with CSS. The trick involves defining the line height to be the same as the height of the box in the CSS. </li>
<li>The ninth CSS trick is using CSS positoning within a container. It is possible to position an object within a container for a cool design effect.</li>
<li> The tenth CSS trick that you may not know is background color running to the screen bottom. You can assign the column color to the appropriate CSS rule to give a desired effect.   <br /> </li>
</ol><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FC%2B%2B%2FTop-10-CSS-Tricks-You-Should-Know.103384"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FC%2B%2B%2FTop-10-CSS-Tricks-You-Should-Know.103384" border="0"/></a>]]></description>
<pubDate>Wed, 02 Apr 2008 06:32:10 PST</pubDate></item>
<item>
<title>Css Tips</title>
<link>http://www.computersight.com/Programming/Css-Tips.82217</link>
<description>
<![CDATA[<ol> 
<li> 
<h3>Easy/Smooth Roll Over Images</h3>
 The Css is like this: It gives the link a background and positions it to 0px on the image, then on hover it moves the image 51px. Try it to see with your own image to make easy rollovers, it only takes one image.  Example:  You make one image, one half is normal and the other half is what you want to see when you hover (normal is 1-50px, hover is 51-100px;). When doing nothing, the image is at 0px or the start of the image. When you hover the image it moves to 51px where the hover image starts. (Image doesn't acually move, just the view box/area you can see of the image moves).</li>
 
<li> 
<h3>Preloading Images</h3>
 Css/Html: As you see I have a css code that goes to the class NAV. On hover it changes to a different image, doing this when the person hasn't already loaded the image to their cache will cause the image to look choppy and take some time to make the hover image appear. Then, you see the div! This puts the image on the page so when the page loads the image loads too, but if you look in the Div you see style='display:none;'. This makes everything in the div invisible so the image won't show put it will still be loaded.</li>
 
<li> 
<h3>Visibility vs Display</h3>
 These are statements that hides something. Both do the same thing but have different results, lets look at the differences:</li>
 </ol> 
<div style="display: none;">
<p><img src="/promotion22222.jpg" alt="" /></p>
</div>
 
<h3>Display</h3>
 
<ul>
<li>Removes from page and moves everything up</li>
 
<li>Can't grab it after deletion</li>
 
<li>Easier To Type</li>
 
</ul>
<h3>Visibility</h3>
 
<ul>
<li>Removes from page but keeps everything in the same place</li>
 
<li>Can still grab it's values and such after deletion</li>
 
<li>More Characters to type and people who can't spell may get it wrong</li>
 
</ul>
<p>&amp;lt;/p&amp;gt;
 &amp;lt;p&amp;gt;.display {&amp;lt;/p&amp;gt;
 &amp;lt;p&amp;gt;display: none;&amp;lt;/p&amp;gt;
 &amp;lt;p&amp;gt;}&amp;lt;/p&amp;gt;
 &amp;lt;p&amp;gt;.visibility {&amp;lt;/p&amp;gt;
 &amp;lt;p&amp;gt;visibility: hidden;&amp;lt;/p&amp;gt;
 &amp;lt;p&amp;gt;}&amp;lt;/p&amp;gt;
 &amp;lt;p&amp;gt;</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FCss-Tips.82217"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FCss-Tips.82217" border="0"/></a>]]></description>
<pubDate>Mon, 11 Feb 2008 02:07:16 PST</pubDate></item>
<item>
<title>How To: Create a Table-less Layout with Dropdown Menus</title>
<link>http://www.computersight.com/Programming/HTML/How-To-Create-a-Tableless-Layout-with-Dropdown-Menus.39880</link>
<description>
<![CDATA[<p>Using tables to layout web pages has never been the intention of tables, but only in recent time has it become common to require web designers to use more browser friendly methods. Of course, only in recent time has the CSS-support been good enough to avoid the tables without way too much hassle, but how do you do the CSS-layout right?</p>
<p>In this article, we will first see how we can define and describe a layout by using CSS instead of tables, before we take a look on the modern way to implement dropdown menus with almost no JavaScript what so ever.</p>
<h3>Sketch</h3>
<p>First of all, you need to know how the layout of the page will be. Draw it down on paper. A rough sketch is more than sufficient. This sketch must be clear on what the different sections of the page is. For example, a common layout can consist of header, navigation, main content, a small column for ads or list content, and footer.</p>
<p>In my sketch I've chosen a static width, centered layout with the mentioned sections where I have a misc content column on the right and a horizontal navigation bar. It’s nothing fancy, but clean and clear.</p>
<p><img alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/28569_0.jpg"></p>

<h3>Structure</h3>
<p>Let’s see how we structure the above layout with (X)HTML.</p>
<p>
&amp;lt;html&amp;gt;<br>
(…)<br>
&amp;lt;body&amp;gt;<br>
<br>
&amp;lt;div id="page_wrapper"&amp;gt;<br>
&amp;lt;div id="header"&amp;gt;&amp;lt;/div&amp;gt;<br>
&amp;lt;div id="nav"&amp;gt;&amp;lt;/div&amp;gt;<br>
&amp;lt;div id="right_column"&amp;gt;&amp;lt;/div&amp;gt;<br>
&amp;lt;div id="border_wrapper"&amp;gt;<br>
&amp;lt;div id="content"&amp;gt;&amp;lt;/div&amp;gt;<br>
&amp;lt;/div&amp;gt;<br>
&amp;lt;div id="footer"&amp;gt;&amp;lt;/div&amp;gt;<br>
&amp;lt;/div&amp;gt;<br>
<br>
&amp;lt;/body&amp;gt;<br>
&amp;lt;/html&amp;gt;
</p>
<p>Notice how simple the html is for this layout. This is the power of using CSS to define layout, versus tables which would require either nesting or some colspan logic.</p>
<p>All the visual-specific stuff will now be separated from the code that specifies the sections, and this enables us to easily modify the look of a page without even touching the html (which on static sites could involve updating dozens of html-files).</p>
<p>You might wonder what the border wrapper is for, but we’ll get to that later.</p>
<h3>Style</h3>
<p>Now, for the CSS, we begin with some of the general attributes:</p>
<p>
body {<br>
margin: 10px;<br>
<br>
font-family: arial, verdana;<br>
font-size: 10pt;<br>
<br>
color: #666;<br>
background-color: white;<br>
}<br>
h1, h2, h3, h4, h5, h6 {<br>
color: #69c;<br>
<br>
margin: 0;<br>
padding: .5em 15px;<br>
}<br>
p {<br>
margin: 0;<br>
padding: 0 15px 1em;<br>
}</p>

<p>There’s nothing special here. I just set the standard for how large the text should be (which affects the em-unit that I use to define font size later), the default font, and a softer text color. I set the default header color to a nice blue, and force the margin for both headers and paragraphs to zero and top/bottom padding to be defined by the font size. I set all these explicitly as different browsers tend to have different defaults for these values, and I want to achieve a consistent look as is possible.</p>

<h3>Layout</h3>

<p>Now for the actual layout, we start with the page wrapper:</p>
<p>
#page_wrapper {<br>
margin: 0 auto;<br>
width: 760px;<br>
<br>
border: 1px solid #ccc;<br>
}</p>
<p>The left and right margins are set to auto. This is the correct way of centering a block, but for this to work in all browsers you must remember to specify the doctype-tag correctly. I currently use XHTML 1.0 Transitional, as it seems to be both flexible and widely supported. The tag for XHTML 1.0 Transitional looks like this:</p>

<p>&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;</p>

<p>I set the width of the page to 760 pixels (always define the unit (e.g. px), unless the value is 0), as this will display correctly on 800x600-screens, and it makes the paragraphs suitably wide for reading.</p>
<p>Note: The design of this page is static width. If you prefer dynamic width just remove the width-attribute from #page_wrapper. The rest of the design will not be broken. You can also specify max-width and min-width to keep some control in the browsers that support these attributes (IE6 does not).</p>
<p>
#header {<br>
width: auto;<br>
<br>
letter-spacing: .6em;<br>
text-align: center;<br>
padding: 2px 0;<br>
<br>
background-color: white;<br>
}<br>
#header h1 {<br>
font-size: 2.2em;<br>
}</p>

<p>This defines the whole look of the header. It gets the blue color from the other headers, and I added some extra letter spacing for a more important feel. Notice that I plan to use the h1-tag for the header text, as this tells both non-visual browsers and search engines that this text is important. You can also define styles for the h2-tag this way, if you want to have a subtitle in the header.</p>
<p>
#nav {<br>
width: auto;<br>
height: 22px;<br>
<br>
border: 1px solid #ccc;<br>
border-width: 2px 1px;<br>
<br>
background-color: #8ac;<br>
}</p>

<p>This defines the look of the navigation bar. We will get back to how we define the dropdown menus later.</p>
<p>
#border_wrapper {<br>
border-right: 300px solid #eee;<br>
}</p>
<p>A right border of 300 pixels? Now that seems a bit much. This is the trick I use to set the background of the right column, without having to use images. This, combined with the right column style, ensures that the background of the right column always covers from top to bottom, which makes it really look like a column, and not a box in the top-right corner.</p>
<p>
#right_column {<br>
width: 300px;<br>
background-color: #eee;<br>
padding: 15px 0;<br>
float: right;<br>
}<br>
#right_column h1, #right_column h2, #right_column h3, #right_column h4, #right_column h5, #right_column h6 {<br>
color: #999;<br>
}</p>
<p>As you see, I have set float to right. This positions the right column exactly over the border of border wrapper. I also set the background color to the same as the 300 pixel border, or the illusion of a right column from top to bottom would be broken.</p>
<p>
#content {<br>
width: auto;<br>
padding: 15px 0;<br>
}</p>
<p>Because of the 300 pixel border, the content will not flow in below the right column content, and we can all be happy.</p>
<p>
#footer {<br>
clear: both;<br>
width: auto;<br>
padding: 3px;<br>
text-align: center;<br>
<br>
border: 1px solid #ccc;<br>
border-top-width: 2px;<br>
<br>
background-color: #8ac;<br>
color: white;<br>
}</p>

<p>This is all just to match the look with the look of the navigation bar.</p>

<h3>Dropdown Menu Structure</h3>

<p>Now, for the dropdown menu, let us write some code to define the menu structure:</p>
<p>
&amp;lt;div id="nav"&amp;gt;<br>
&amp;lt;ul&amp;gt;<br>
&amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;Link 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;<br>
&amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;Link 2&amp;lt;/a&amp;gt;<br>
&amp;lt;ul&amp;gt;<br>
&amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;Sub link 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;<br>
&amp;lt;li&amp;gt;&amp;lt;a href=""&amp;gt;Sub link 2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;<br>
&amp;lt;/ul&amp;gt;<br>
&amp;lt;/li&amp;gt;<br>
&amp;lt;/ul&amp;gt;<br>
&amp;lt;/div&amp;gt;</p>
<p>This defines a menu with two links, where link 2 has two sub links. Tip: If you experience that the menu items is spaced wider apart in some browsers than others, try to remove the whitespace between the list elements, as this can add extra padding sometimes (usually this is avoided if you specify the doctype-tag correctly).</p>

<h3>Making the Dropdown Menu Functional</h3>

<p>Firstly, we will just assume that all browsers support the :hover pseudo-class for all elements. Utilizing this and the parent-child feature of CSS, we can design a clever dropdown menu with no advanced or confusing JavaScript involved. Here is the CSS with some explaining comments, and some warnings about things you might think will work, but won’t (on all browsers):</p>
<p>
/* Affecting all ul and li elements under navigation */<br>
#nav ul {<br>
margin: 0;<br>
padding: 0;<br>
<br>
list-style: none;<br>
}<br>
#nav li {<br>
margin: 0;<br>
padding: 0;<br>
    <br>
float: left;<br>
    <br>
border-right: 2px solid #ccc;<br>
}<br>
/* Affecting only ul and li elements in sub menus */<br>
#nav li ul li {<br>
border-right: none;<br>
border-top: 2px solid #ccc;<br>
}<br>
#nav li ul {<br>
width: 100px;<br>
<br>
position: absolute;<br>
/*<br>
 * Trick that keeps the sub menus that shouldn’t be visible, invisible.<br>
 * Don’t try and use display: none; instead, as this may not result in<br>
 * the desired effect in all browsers.<br>
 */<br>
left: -999em;<br>
top: 0; /* Don’t set to auto, it will break in some browsers. */<br>
}<br>
/* This automatically places the sub menu where it should be; below the parent menu item */<br>
#nav li:hover ul {<br>
left: auto;<br>
top: auto;<br>
}</p>
<p>That was a decent amount of CSS, but not nearly as much as the JavaScript equivalent would be. I will not go more into detail about what this code does, other than that it does show the sub menus when the user hovers the mouse over the parent element. This code is sufficient for one level of sub menus only. More levels can be added by simply extending this CSS-code.</p>

<h3>Designing the Links</h3>

<p>Defining the look of the links is done by the following CSS:</p>
<p>
#nav a:link, #nav a:visited, #nav a:active {<br>
display: block;<br>
<br>
width: 100px;<br>
margin: 0;<br>
padding: 3px 10px;<br>
<br>
text-decoration: none;<br>
<br>
background-color: #58c;<br>
color: white;<br>
}<br>
#nav a:hover {<br>
background-color: #69d;<br>
}</p>

<p>This makes the menu items nice buttons that changes color when hovered. Also, the whole button is clickable, not just the text, which is a nice feature.</p>

<h3>The Suckerfish Solution</h3>
<p>Now, as some of you might have noticed, the dropdown menus will not work in IE6 (and all other browsers that doesn’t support :hover). Luckily, this problem has been solved already. All you need is a tiny JavaScript and a small addition in the CSS, and we’re good to go. The JavaScript is known as Suckerfish, and the one I prefer can be found at HTML Dog. The required changes to the CSS is an addition to all the :hover elements, as follows:</p>
<p>
#nav li:hover ul {<br>
…is changed to…<br>
#nav li:hover ul, #nav li.sfhover ul {</p>
<p>…and that’s it! If you include the Suckerfish-script, the dropdown menus should now work on IE6 as well (and even some older versions of IE).</p>
<h3>Conclusion</h3>
<p>There it is. You should now have a good idea of how to start creating your own table-less layout with dropdown menus. You will probably face some of the many oddities of browsers that makes your site display differently on different browsers, but don’t give up (or turn mad, as many do), it is usually possible to work around them, or at least get an acceptable result.</p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FHTML%2FHow-To-Create-a-Tableless-Layout-with-Dropdown-Menus.39880"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FHTML%2FHow-To-Create-a-Tableless-Layout-with-Dropdown-Menus.39880" border="0"/></a>]]></description>
<pubDate>Fri, 04 May 2007 04:24:18 PST</pubDate></item>
<item>
<title>Red Dragon's CSS Workshop Part one: Fonts</title>
<link>http://www.computersight.com/Programming/HTML/Red-Dragons-CSS-Workshop-Part-one-Fonts.39828</link>
<description>
<![CDATA[<p>Welcome to my CSS workshop! This is part 1, and discusses fonts. Changing their colours, size, faces etc.</p>
 <h3>Integrating CSS in HTML</h3>
 <p>To integrate CSS in html, you use <style> tags. In between the <style></style> CSS information is given. It is recommended you put the CSS info within the HEAD tags.</p>
 <h3>Basics of CSS</h3>
 <p>CSS is quite simple. It is quite English-like and easy to learn. CSS can do a lot of things, and most professional web designs use CSS.</p>
 <p>The format of CSS is:</p>
 <p>tag.class {</p>
 <p>property: value(s);</p>
 <p>}</p>
 <p>class is optional, and is quite advanced. There are also IDs, but that's also quite advanced.</p>
 <p>Anyways, using this format, you can format any html tag you wish (as long as it is a valid, not made up html tag). For now, we'll be formatting the body. Therefore tag will be body. CSS is not case sensitive.</p>
 <p>body {</p>
 <p>}</p>
 <h3>Fonts</h3>
 <p>Now finally onto the fonts. OK, so, within the tag we would put the properties concerning fonts and their values.</p>
 <p>Changing Colour</p>
 <p>To change the colour of a font, the property is: color: <value>; The value can either be a colours name (that is supported by the browser), or a "hex" colour ( #rrggbb ). I will put a colour name and hex chart on here soon. So if we wanted red, we could say: color: red; or color: #ff0000;</p>
 <p>So far..</p>
 <p>So here's what we have so far (entire html)</p>
 <p><html><head><style></p>
 <p>body {</p>
 <p>color: red;</p>
 <p>}</p>
 <p></style></head><body></p>
 <p>Hello!</body></html></p>
 
<h3>Changing the face</h3>

 <p>The face of the font is the font's image. e.g. Arial, Comic Sans etc. Please note that it is best to use common fonts, like Arial rather than rarer fonts, like Architext. The value can have different fonts, seperated by commas. This works like this: "If I cant find the first font, ill use the second, etc". You can also use font styles. These are: sans-serif, serif, monospace, cursive and fantasy. These are also known as "generic fonts". So, if we wanted a monospace font we could use Courier New and Monospace. The property for this is: font-family: <fonts>; So: font-family: "Courier New", Monospace; Please note that CSS values that have spaces, must be surround by quotes " or ".</p>
 
<h3>Font Size</h3>

 <p>The size is simple. The property is: font-size: <size>; size can be measured in different units. The main one is: pt, for point. This is the one you would use in most office programs. This text is 12pt. You don"t have to put the measurement at the end, but it may vary the size depending on the browser's default unit. For 15 pt text: font-size: 15pt; Simple.</p>
 <p>The final example...</p>
 <p>Ok, so here it is, all you have learnt from this tutorial, I hope you understood it! Please post any comments in the "Social Forum".</p>
 <p><html><head><style></p>
 <p>body {</p>
 <p>font-family: "Courier New",monospace;</p>
 <p>font-size: 15pt;</p>
 <p>color: red;</p>
 <p>}</p>
 <p></style></head><body>HELLO!</body></html></p>
 <p>The next tutorial will discuss more font styles, including bold, italic and underline. </p><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FHTML%2FRed-Dragons-CSS-Workshop-Part-one-Fonts.39828"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FProgramming%2FHTML%2FRed-Dragons-CSS-Workshop-Part-one-Fonts.39828" border="0"/></a>]]></description>
<pubDate>Sun, 18 Mar 2007 08:03:33 PST</pubDate></item>
</channel>
</rss>
