<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Brian Swartzfager&apos;s Blog - CSS</title>
			<link>http://www.swartzfager.org/blog/index.cfm</link>
			<description>blog</description>
			<language>en-us</language>
			<pubDate>Fri, 03 Sep 2010 12:38:07 -0400</pubDate>
			<lastBuildDate>Thu, 21 May 2009 07:29:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>bcswartz@gmail.com</managingEditor>
			<webMaster>bcswartz@gmail.com</webMaster>
			
			<item>
				<title>Mozilla Announces Jetpack, an API For Writing FireFox Adds-On with jQuery, HTML, and CSS</title>
				<link>http://www.swartzfager.org/blog/index.cfm/2009/5/21/Mozilla-Announceds-Jetpack-an-API-For-Writing-FireFox-AddsOn-with-jQuery-HTML-and-CSS</link>
				<description>
				
				I found out about this last night from a tweet sent out by the &lt;a href=&quot;http://www.twitter.com/jquery&quot; target=&quot;_blank&quot;&gt;jQuery Twitter account&lt;/a&gt; (which is probably a good indication that they like the idea).

The subject line pretty much says it all:  Jetpack is designed to let current web developers use their existing skills with HTML, CSS, JavaScript, and jQuery to build Firefox add-ons/plugins without the need to mess with Firefox&apos;s XUL mark-up language.  While JavaScript has always been part of the add-on development process, the inclusion of jQuery should make performing certain actions a whole lot easier.

You can learn more about Jetpack via the following URLs:

&lt;ul&gt;
&lt;li&gt;
&lt;a href=&quot;https://jetpack.mozillalabs.com/&quot; target=&quot;_blank&quot;&gt;https://jetpack.mozillalabs.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;http://labs.mozilla.com/2009/05/introducing-jetpack-call-for-participation/&quot; target=&quot;_blank&quot;&gt;http://labs.mozilla.com/2009/05/introducing-jetpack-call-for-participation/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&quot;https://jetpack.mozillalabs.com/tutorial.html&quot; target=&quot;_blank&quot;&gt;https://jetpack.mozillalabs.com/tutorial.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

...the tutorials in the final link give you a good idea of the kinds of things Jetpack will allow you to do:  the last example is a Jetpack add-on that will count and display the number of unread e-mails in your Gmail Inbox.

I want to give Jetpack a whirl, but I honestly can&apos;t think of any functionality I want to add to Firefox that I can&apos;t get from an existing plugin.  Anyone have any suggestions for something to try with Jetpack? 

It&apos;s interesting how web technologies keep being repurposed as a development option in other technologies (Adobe AIR, the upcoming Palm Pre&apos;s &lt;a href=&quot;http://developer.palm.com/&quot; target=&quot;_blank&quot;&gt;WebOS&lt;/a&gt;, and now Jetpack).  Even though I&apos;m not particularly interested in delving into all these different areas, I must say that I like the trend.  :) 
				</description>
				
				<category>RIAs</category>
				
				<category>Miscellaneous</category>
				
				<category>jQuery</category>
				
				<category>JavaScript</category>
				
				<category>CSS</category>
				
				<pubDate>Thu, 21 May 2009 07:29:00 -0400</pubDate>
				<guid>http://www.swartzfager.org/blog/index.cfm/2009/5/21/Mozilla-Announceds-Jetpack-an-API-For-Writing-FireFox-AddsOn-with-jQuery-HTML-and-CSS</guid>
				
			</item>
			
			<item>
				<title>Changing Individual CSS Styles with jQuery</title>
				<link>http://www.swartzfager.org/blog/index.cfm/2008/2/21/Changing-Individual-CSS-Styles-with-jQuery</link>
				<description>
				
				Back when I was writing my own custom JavaScript functions, I learned that there wasn&apos;t a single, simple way to change the individual style settings (like &quot;font-weight:bold&quot;) for an HTML element that worked on every browser.  My solution was to change the CSS classes assigned to the element instead:  I wrote a library function that would allow me to add, remove, or replace any class assigned to an HTML element and simply created as many class definitions as I needed in order to accommodate the style changes.  It was actually a pretty effective workaround because it let me effectively change multiple styles with one function call.

When I started using jQuery, I quickly learned about the &quot;addClass&quot; and &quot;removeClass&quot; core functions, which I could use instead of my library function:

&lt;code&gt;
$(&quot;#missionStatement&quot;).addClass(&quot;importantTextClass&quot;);
$(&quot;#userProfile&quot;).removeClass(&quot;hideTextClass&quot;);
&lt;/code&gt;

...So I continued with my routine of changing styles by changing classes, even though sometimes I only needed to change or remove a single style setting.  No harm, no foul.

But changing classes wouldn&apos;t work for the wacky little project I&apos;ve been working on recently:  I needed to be able to change several styles for an HTML element individually, and writing a class to handle every permutation of the possible style combinations was impractical.

So I went to the &lt;a href=&quot;http://www.jquery.com&quot; target=&quot;_blank&quot;&gt;jQuery web site&lt;/a&gt;, hopeful that the brilliant folks at jQuery had something that could help me out.

And they did:  the &quot;css&quot; core function allows you to read or set any individual style or styles:

&lt;code&gt;
if ($(&quot;#missionStatement&quot;).css(&quot;font-weight&quot;)== &quot;400&quot; || $(&quot;#missionStatement&quot;).css(&quot;font-weight&quot;)== &quot;normal&quot;)
 {
   $(&quot;#userProfile&quot;).css(&quot;display&quot;,&quot;none&quot;);    
   $(&quot;#missionStatement&quot;).css({ fontSize:&quot;24px&quot;, fontWeight:&quot;bold&quot; });
  }
&lt;/code&gt;

Have I mentioned that I love jQuery?  :) 
				</description>
				
				<category>jQuery</category>
				
				<category>JavaScript</category>
				
				<category>CSS</category>
				
				<pubDate>Thu, 21 Feb 2008 07:20:00 -0400</pubDate>
				<guid>http://www.swartzfager.org/blog/index.cfm/2008/2/21/Changing-Individual-CSS-Styles-with-jQuery</guid>
				
			</item>
			
			<item>
				<title>UI Tool:  Rearranging Items in a List, jQuery-style!</title>
				<link>http://www.swartzfager.org/blog/index.cfm/2007/11/11/UI-Tool--Rearranging-Items-in-a-List-jQuerystyle</link>
				<description>
				
				A few weeks ago, as part of an application prototype for a client, I used the fairly new jQuery UI library to create a UI tool where a user could rearrange a list of items by dragging and dropping them into different positions and then save those changes to the database.

I now have a public example posted and available for download--check it out using the link below or via the link in my Downloads list on the right:

&lt;a href=&quot;/blog/jQuerySortList.cfm&quot;&gt;List Sort Control (with jQuery)&lt;/a&gt;

It works in FireFox, IE, and Opera, and can be used in conjunction with any web application programming language. 
				</description>
				
				<category>jQuery</category>
				
				<category>JavaScript</category>
				
				<category>Downloads</category>
				
				<category>CSS</category>
				
				<pubDate>Sun, 11 Nov 2007 10:47:00 -0400</pubDate>
				<guid>http://www.swartzfager.org/blog/index.cfm/2007/11/11/UI-Tool--Rearranging-Items-in-a-List-jQuerystyle</guid>
				
			</item>
			
			<item>
				<title>When Experience Tells You It Can&apos;t Be True, It Probably Isn&apos;t</title>
				<link>http://www.swartzfager.org/blog/index.cfm/2007/11/7/When-Experience-Tells-You-It-Cant-Be-True-It-Probably-Isnt</link>
				<description>
				
				Today I was trying to troubleshoot a design tool I created that worked perfectly in FireFox but not in Internet Explorer.  There was an element on the page, a &amp;lt;div&amp;gt;, that IE would not apply the CSS style to if the style was applied based on the id attribute of the &amp;lt;div&amp;gt;.  I could however apply styles to it if I added a class attribute to it and wrote the class in my CSS stylesheet.

It made no sense.  I&apos;d assigned styles based on the id attribute all the time, and had never seen this problem in any modern browser.  What the heck was going on?

Finally I saw my mistake:  I had left off the closing bracket of the &amp;lt;div&amp;gt; that was the parent of the &amp;lt;div&amp;gt; I was having trouble with.  FireFox was &quot;kind&quot; (aka presumptive) enough to close that tag at runtime, and IE was not.

Had I trusted my experience a little quicker, I&apos;d have looked at the HTML code for structural problems first before trying to figure out a way around the problem. 
				</description>
				
				<category>CSS</category>
				
				<category>Web development</category>
				
				<pubDate>Wed, 07 Nov 2007 09:46:00 -0400</pubDate>
				<guid>http://www.swartzfager.org/blog/index.cfm/2007/11/7/When-Experience-Tells-You-It-Cant-Be-True-It-Probably-Isnt</guid>
				
			</item>
			
			<item>
				<title>Using Conditional CSS Selectors</title>
				<link>http://www.swartzfager.org/blog/index.cfm/2007/1/5/Using-Conditional-CSS-Selectors</link>
				<description>
				
				The CSS I use in my applications is pretty straightforward.  I stick with the basics, assigning styles based on element id, classes, and pseudo-classes.

When situations arise that require similar page elements to utilize differnet styles, I use ColdFusion or JavaScript code to evaluate the condition and assign the appropriate CSS class.

This article I found today is an excellent description about how to use CSS selectors to act only on page elements that meet a certain description--no JavaScript or server-side coding required:

&lt;a href=&apos;http://www.askthecssguy.com/2006/12/showing_hyperlink_cues_with_cs_1.html&apos;&gt;Showing Hyperlink Cues with CSS&lt;/a&gt;

Since he makes a point of saying these selectors will work in IE 7, I can only assume that they won`t work (or at least not well) in IE 6, so you may not want to use these selectors unless you have a backup plan for mimicking the end-result using another method or you know your audience has upgraded to IE 7.  Still, something worth knowing and a feature to look forward to as IE 6 rides off into the sunset. 
				</description>
				
				<category>CSS</category>
				
				<pubDate>Fri, 05 Jan 2007 17:36:00 -0400</pubDate>
				<guid>http://www.swartzfager.org/blog/index.cfm/2007/1/5/Using-Conditional-CSS-Selectors</guid>
				
			</item>
			</channel></rss>