<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>rob&#039;s blog &#187; css</title>
	<atom:link href="http://banagale.com/category/css/feed" rel="self" type="application/rss+xml" />
	<link>http://banagale.com</link>
	<description>I have a theory that the truth is never told during the nine-to-five hours. -Hunter S. Thompson</description>
	<lastBuildDate>Tue, 26 Jul 2011 08:14:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>View Source from Safari on iPad</title>
		<link>http://banagale.com/view-source-from-safari-on-ipad.htm</link>
		<comments>http://banagale.com/view-source-from-safari-on-ipad.htm#comments</comments>
		<pubDate>Fri, 09 Apr 2010 08:19:27 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[gadget]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[www]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[view source]]></category>

		<guid isPermaLink="false">http://banagale.com/?p=476</guid>
		<description><![CDATA[I&#8217;ve been enjoying the iPad quite a bit.  This device is going to change everything.  I have lots of thoughts, one of which is that the iPad will be a high productivity device.  Feeding into that, here&#8217;s a quick way to view the html, css and javascript source code of a web page from Safari [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been enjoying the iPad quite a bit.  This device is going to change everything.  I have lots of thoughts, one of which is that the iPad will be a high productivity device.  Feeding into that, here&#8217;s a quick way to view the <em>html, css and javascript source </em>code of a web page from<em> Safari</em> on the iPad.</p>
<p>This guide is adapted from <a href="http://dustincaruso.com/javascript/view-source-on-iphone/">Dustin Caruso&#8217;s note</a> on viewing source in Safari for the iPhone.</p>
<p>1. Visit this page using Safari on your iPad.<span id="more-476"></span></p>
<p>2. Use your touch selection skills to copy the following line of javascript:<br />
<textarea cols="50" rows="8" name="description">javascript:var%20sourceWindow%20%3D%20window.open%28%27about%3Ablank%27%29%3B%20%0Avar%20newDoc%20%3D%20sourceWindow.document%3B%20%0AnewDoc.open%28%29%3B%20%0AnewDoc.write%28%27%3Chtml%3E%3Chead%3E%3Ctitle%3ESource%20of%20%27%20%2B%20document.location.href%20%2B%20%27%3C/title%3E%3C/head%3E%3Cbody%3E%3C/body%3E%3C/html%3E%27%29%3B%20%0AnewDoc.close%28%29%3B%20%0Avar%20pre%20%3D%20newDoc.body.appendChild%28newDoc.createElement%28%22pre%22%29%29%3B%20%0Apre.appendChild%28newDoc.createTextNode%28document.documentElement.innerHTML%29%29%3B</textarea><br />
3. Tap  + then Add Bookmark</p>
<p>4. The first text field is the Title field. Use the title, View Source.   Leave the second field (the Address Field) alone and hit save.</p>
<p>5. Tap the Bookmarks icon and then edit.  Find View Source in the list and tap the right arrow for the bookmark&#8217;s details.  Now tap the Address Field and hit the X icon to clear it. Tap and paste the javascript from the clipboard.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-478" title="Edit Bookmarklet safari ipad view source" src="http://banagale.com/blog/wp-content/uploads/2010/04/bookmark_edit.png" alt="" width="375" height="370" /></p>
<p>5. Tap the Bookmarks navigation item to save the changes.</p>
<p>Voila.  Go to any web page using Safari, tap the Bookmarks icon and hit View Source.  Safari will open a page of source code in plain text in a new window.</p>
<p><img class="aligncenter size-full wp-image-477" title="View Source in Safari on the iPad" src="http://banagale.com/blog/wp-content/uploads/2010/04/view_source.png" alt="" width="420" height="190" /></p>
<p><a href="http://www.twitter.com/jetsetter"><img class="alignnone" title="twitter banagale" src="http://www.banagale.com/blog/wp-content/uploads/2009/12/rob-twitter.png" alt="" width="214" height="80" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://banagale.com/view-source-from-safari-on-ipad.htm/feed</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
		<item>
		<title>Using an HTML Web View with a Transparent Background in iPhone SDK&#8217;s Interface Builder and Xcode</title>
		<link>http://banagale.com/using-an-html-web-view-with-a-transparent-background-iphone-interface-builder.htm</link>
		<comments>http://banagale.com/using-an-html-web-view-with-a-transparent-background-iphone-interface-builder.htm#comments</comments>
		<pubDate>Fri, 26 Jun 2009 16:32:36 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[mobile computing]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[transparency]]></category>
		<category><![CDATA[uitextview]]></category>
		<category><![CDATA[uiwebview]]></category>

		<guid isPermaLink="false">http://banagale.com/?p=340</guid>
		<description><![CDATA[Something almost every iPhone application needs is an About and Help view that allows the user to learn a little bit about the application they&#8217;re using and  how it should be operated.  The problem with a UITextView in Apple&#8217;s XCode and Interface Builder SDK is that you can not use rich-text styling or even bold [...]]]></description>
			<content:encoded><![CDATA[<p>Something almost every iPhone application needs is an About and Help view that allows the user to learn a little bit about the application they&#8217;re using and  how it should be operated.  The problem with a UITextView in Apple&#8217;s XCode and Interface Builder SDK is that you can not use rich-text styling or even bold one line over another.</p>
<p>One solution to this problem would be to create image files containing stylized text and then rasterize them and allow the user to page through them.  The problem with this is that you can&#8217;t have tappable URLs or links embedded in the text.</p>
<p>David Peixotto, coding ninja and my business partner for <a href="http://www.neutrinosllc.com">Neutrinos</a>, suggested we look at using a Webview or HTML view and put an imageview in the background.  The trick is telling the iPhone to display a UIWebView with a transparent background.  I looked around for the solution to this and came across <a href="http://www.iphonedevsdk.com/forum/iphone-sdk-development/4918-uiwebview-render-speeds-white-background.html#post24796">this helpful post</a> in the iPhone Developer SDK forums.</p>
<p>Step one of getting a transparent web view in interface builder is to create HTML in the controller.m for the view containing the webview that contains the CSS line: &lt;body style=&#8221;background-color:transparent&#8221;&gt; Inside the &lt;head&gt; &lt;/head&gt; sections of the html.</p>
<p>Step two is to set the background color of the webview to clear or transparent:  myWebView.backgroundColor = [UIColor clearColor];<span id="more-340"></span></p>
<p>Step three is to make sure that the &#8220;Opaque&#8221; box on the inspector of properties of the WebView is unchecked.</p>
<p>That should be all you need to do.  Drop a UIImageView behind the newly transparented web view object and you should be able to use a scrollable rich text with hyperlinks.  Horray.</p>
<p>If this helped you or confused you more, please post in the comments!  We do have it working on 3.0 much to the happiness of our client.</p>
]]></content:encoded>
			<wfw:commentRss>http://banagale.com/using-an-html-web-view-with-a-transparent-background-iphone-interface-builder.htm/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Display a Simple Loading Message and Animated Loading Gif Using JavaScript</title>
		<link>http://banagale.com/display-a-simple-loading-message-and-animated-loading-gif-using-javascript.htm</link>
		<comments>http://banagale.com/display-a-simple-loading-message-and-animated-loading-gif-using-javascript.htm#comments</comments>
		<pubDate>Wed, 20 May 2009 19:57:28 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[www]]></category>
		<category><![CDATA[action cueing]]></category>
		<category><![CDATA[dynamic webpages]]></category>
		<category><![CDATA[visual feedback]]></category>

		<guid isPermaLink="false">http://banagale.com/?p=310</guid>
		<description><![CDATA[Some pages require an inordinate amount of time to load.  For most sites, this is a big problem.  Webmasters and SEO specialists know the value of a quick landing page load, because they know that netizens have short attention spans. Dynamically built webpages, (especially applications), require time to load and visual feedback that something is happening. [...]]]></description>
			<content:encoded><![CDATA[<p>Some pages require an inordinate amount of time to load.  For most sites, this is a big problem.  Webmasters and SEO specialists know the value of a quick landing page load, because they know that netizens have short attention spans.</p>
<p>Dynamically built webpages, (especially applications), require time to load and visual feedback that <em>something</em> is happening.  The most famous example is the gmail loading page:</p>
<p><img class="aligncenter size-full wp-image-312" title="Loading Message and Animated Gif Example Javascript" src="http://banagale.com/blog/wp-content/uploads/2009/05/loading_animated_gif_javascript1.jpg" alt="Loading Message and Animated Gif Example Javascript" width="480" height="243" /></p>
<p>Gmail uses a more sophisticated progress bar to represent the loading of the webpage.  I found <a href="http://yensdesign.com/2008/11/how-to-create-a-stylish-loading-bar-as-gmail-in-javascript/">an article on yensDesign</a> that gives some great advice on how to do this, if you want to get really fancy.</p>
<p>If you have a dynamically built page that you&#8217;d like to give a loading message to that doesn&#8217;t require a full progress bar, I recommend simply displaying a message and an animated gif.</p>
<p><strong>The Method</strong></p>
<p>The trick to accomplishing this is a small mix of JavaScript and CSS.  You don&#8217;t have to be using &lt;div&gt;&#8217;s to display your content, but you should.  My example uses &lt;div&gt;&#8217;s.<span id="more-310"></span></p>
<p>Let&#8217;s begin by assuming you have the majority of your page&#8217;s content within a series of nested DIV&#8217;s, where the outermost DIV is called &#8220;container.&#8221;</p>
<pre>
 &lt;div id="container"&gt;
    &lt;div id="heading"&gt;
       ...heading content...
     &lt;/div&gt;
     &lt;div id="body"&gt;
       ...body content...
     &lt;/div&gt;
  &lt;/div&gt;</pre>
<p>Normally, the dynamic content in your container would be rendered by the browser after it has downloaded and performed the main JavaScript routines.  What we want to do is hide the container when the page is first loaded and instead display a DIV that contains a waiting message and a little animated gif icon.</p>
<p>Begin by using the CSS <em>display </em>property to hide the container DIV like so:</p>
<pre>  &lt;div id="container" style="display:none"&gt;</pre>
<p>Next, you need to add a new DIV that contains your &#8220;Please Wait, loading&#8230;&#8221; message.  I chose to include an animated gif icon of a twirling circle, which I easily created using the <a href="http://www.ajaxload.info/">AjaxLoad.info</a>, a site created by <a href="http://www.kath.fr/">Catherine Roman</a>.   If you want to download my animated loading gif, you can <a href="http://banagale.com/portfolio/images/ajax-loader.gif">get it here</a>.</p>
<p>Here is an additional set of nested DIV&#8217;s that contain the loading content.  This should be placed outside the container DIV:</p>
<pre>      &lt;div id='siteLoader'&gt; 
        &lt;div id='siteDetailLoader'&gt; 
        &lt;img src='/path/to/your/animated/gif/loading.gif' border='0'&gt; 
        Please wait while the page loads...&lt;br /&gt; &lt;br /&gt; 
        &lt;/div&gt; 
      &lt;/div&gt; </pre>
<p>You&#8217;ll note that the display property is not set on siteLoader because it is visible by default.  This is what we want.  The trick now is to make the siteLoader DIV dissappear once the dynamic page content is done loading while simultaneously displaying the container DIV with the real page content.</p>
<p>This is handled using the global event handler <a href="http://javascript.about.com/library/blonload.htm">onLoad</a>.  There a few ways to make use of the onLoad event, I recommend including an external JavaScript file.  Do this by saving a new text file called actions.js in the same directory as the page you&#8217;re changing.  Just after your &lt;title&gt; tag on your document include this external JavaScript  file using:</p>
<p><span style="font-family: 'Courier New'; line-height: 18px; white-space: pre;">&lt;script src=&#8221;actions.js&#8221; type=&#8221;text/javascript&#8221;&gt;&lt;/script&gt;</span></p>
<p>Inside actions.js, you need to include a function based on window.onload as follows:</p>
<pre>window.onload = function() {
   document.getElementById("siteLoader").style.display = "none";
   document.getElementById("container").style.display = "block";
}</pre>
<p>What this is doing is saying to the browser, &#8220;as soon as you&#8217;re done loading the webpage, you should hide the &#8216;please wait&#8217; stuff and show the meat and potatos of my webpage.&#8221;</p>
<p>To view all of this in action, have a look at my recently <a href="http://www.banagale.com/portfolio">updated online portfolio</a> which of course, talks up what a great person I am. <img src='http://banagale.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   I hope this has been helpful, as always&#8211;please post your comments!</p>
<p>For further reading on busy indicators and the important visual feedback and attention cueing needed to be successful with the display of heavy dynamic webpages, have a look at the article series on SAP Design Guild by Gerd Waloszek called &#8220;<a href="http://www.sapdesignguild.org/community/design/busy_feedback_3.asp">Waiting at the Computer: Busy Indicators and System Feedback</a>.&#8221;   There is a wonderful table giving guidelines on the type of feedback that should be displayed based on user wait time.</p>
]]></content:encoded>
			<wfw:commentRss>http://banagale.com/display-a-simple-loading-message-and-animated-loading-gif-using-javascript.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom Styling the ShareThis Button Using CSS Without API Calls</title>
		<link>http://banagale.com/custom-styling-the-sharethis-button-using-css-without-api-calls.htm</link>
		<comments>http://banagale.com/custom-styling-the-sharethis-button-using-css-without-api-calls.htm#comments</comments>
		<pubDate>Wed, 06 May 2009 17:34:41 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[www]]></category>
		<category><![CDATA[sharethis]]></category>

		<guid isPermaLink="false">http://banagale.com/?p=302</guid>
		<description><![CDATA[I was just doing a ShareThis icon for a client I&#8217;m working with and found that how to properly style the button is poorly documented.  In order to replace the whole icon and text, you are supposed to use the developer API. I only wanted to style the text, so I was hunting for some [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-303" style="float:right" title="ShareThis CSS Style Classes Button" src="http://banagale.com/blog/wp-content/uploads/2009/05/sharethis-logo.jpg" alt="ShareThis CSS Style Classes Button" width="150" height="150" /></p>
<p>I was just doing a ShareThis icon for a client I&#8217;m working with and found that how to properly style the button is poorly documented.  In order to replace the whole icon and text, you are <a href="http://support.sharethis.com/developers/developers-faq/stapi/62">supposed to use</a> the developer API.</p>
<p>I only wanted to style the text, so I was hunting for some CSS to style the text and could not find the right classes to call.  Some hunting turned up the following:<span id="more-302"></span></p>
<p><strong>.stbuttontext</strong> &#8211; This class will allow you to change the look of the text, ShareThis.  You can style it with any normal styling like color or font-family but text-decoration does not seem to work. :p</p>
<p><strong>.stico_default</strong> &#8211; This class allows you to style the icon itself.  An example on how to replace the ShareThis icon with your own site&#8217;s favicon <a href="http://www.webmonkey.com/tutorial/Share_Your_Site_With_ShareThis">webmonkey</a> is: </p>
<pre>{
	background: transparent url(http://www.banagale.com/favicon.ico) no-repeat scroll 0px 0px !important;
}</pre>
<p>I&#8217;m interested in any other css that can be used to style the ShareThis button without requiring API calls (if there are any).   if you know of additional classes, or this helped you please post a reply.</p>
<p><a href="http://www.twitter.com/jetsetter">Follow me on Twitter</a></p>
]]></content:encoded>
			<wfw:commentRss>http://banagale.com/custom-styling-the-sharethis-button-using-css-without-api-calls.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

