<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6447937380359725712</id><updated>2012-02-23T06:22:56.057-08:00</updated><category term='confrontation frustration boss'/><category term='design brains book'/><category term='introduction'/><category term='ie7 css :before jquery'/><category term='html5 video'/><title type='text'>SteveSoft</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.steven-smith.net/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6447937380359725712/posts/default'/><link rel='alternate' type='text/html' href='http://www.steven-smith.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Steve S.</name><uri>http://www.blogger.com/profile/10235196063268851980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_EaCqBmYmUyw/SkKwippR3BI/AAAAAAAAABg/hjQ1hdrTSs4/S220/me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6447937380359725712.post-942244426314127960</id><published>2012-02-20T21:48:00.000-08:00</published><updated>2012-02-20T21:48:01.423-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='html5 video'/><title type='text'>Interactive HTML5 Video</title><content type='html'>So a good friend of mine who does video capture/editing for a living hit (&lt;a href="http://kittervideography.webs.com/" target="_blank"&gt;Adam Kitter Media&lt;/a&gt;) me up the other day asking about interactive videos. In his opinion, they are the future of video online. Based on things I've seen online, I do not disagree. So he was asking me if I'd be interested in perhaps doing some of the programmatic work. Having no experience with video, I said I'd have to do some research on it. However, what I could say with certainty at that point was that there are two main video formats right now: Flash and HTML5. Since Flash is slowly being phased out, I told him the way to implement it should be HTML5.&lt;br /&gt;&lt;br /&gt;Like video, my experience with HTML5 was almost zero so I had to learn some of things required. The first thing I learned was that putting a video on a page with HTML5 is &lt;b&gt;very easy!&lt;/b&gt; Honestly, I spent more time trying to locate a video file in .mp4 and .ogg on my computer than getting the thing to work. &lt;br /&gt;&lt;br /&gt;Code required to play a video in HTML5:&lt;br /&gt;&lt;code&gt;&lt; html&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt; body&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt; video id="theVideo" width="480" height="360" controls="controls"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt; source src="fileName.mp4" type="video/mp4" /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt; source src="fileName.ogg" type="video/ogg" /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Your browser does not support the video tag.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt; /video&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt; /body&gt;&lt;br /&gt;&lt; /html&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;The keen observer will note, that there are two video files within the video tag above. In the perfect world, one file format would work for all browsers (hehe or there would one browser to rule them all), however we do not live in a perfect world and not every browser supports all file types. As of this writing, the HTML5 video player supports three file types: MP4, WebM, and OGG. A combination of two of those file formats should cover all the major HTML5-supporting browsers (IE 9+, FF 4+, Chrome 6+, Safari 5+, and Opera 10.6+). If I use the code snippet above as an example, Safari loads the .mp4 video just fine, but Firefox does not and it falls back on the .ogg file. If the browser supports none of video files or does not support HTML5 video, you will get the error message. &lt;br /&gt;&lt;br /&gt;The code snippet above isn't very interactive (minus the play/pause button), so I began looking for ways to move about the video to make it "interactive". For a first-pass implementation, I decided to create a set of "buttons" that allow the user to jump around the video (read: colored divs with onclick events).&lt;br /&gt;&lt;br /&gt;For this implementation, I made use of two important time fields: &lt;code&gt;currentTime&lt;/code&gt; and &lt;code&gt;duration&lt;/code&gt; (there are others). Both are fairly self explanatory, &lt;code&gt;duration&lt;/code&gt; is the length of the video, and &lt;code&gt;currentTime&lt;/code&gt; is the time index the video is currently on - both values are seconds as counted in floats. &lt;br /&gt;&lt;br /&gt;From my research, I gathered that there are a number of ways to implement the "buttons" I wanted. However, I decided to use jQuery to handle the onclick events. Basically, I had each button adjust the &lt;code&gt;currentTime&lt;/code&gt; attribute to a different point in the movie (beginning, 1/3, 2/3, end). &lt;br /&gt;&lt;br /&gt;&lt;code&gt;$('#link1').click(function() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var video = document.getElementById("theVideo");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;video.currentTime = 0;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;$('#link2').click(function() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var video = document.getElementById("theVideo");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;video.currentTime = (video.duration - (video.duration * 0.666));&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;$('#link3').click(function() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var video = document.getElementById("theVideo");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;video.currentTime = (video.duration - (video.duration * 0.333));&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;$('#link4').click(function() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var video = document.getElementById("theVideo");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;video.currentTime = video.duration - 1;&lt;br /&gt;});&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Once I had the time index changing working I just slapped a little styling on the buttons and voila! My first pseudo-interactive HTML5 video player. In retrospect, the most difficult of building this was locating a place to host the videos for this blog post. &lt;br /&gt;&lt;br /&gt;I still have a ways to go before I'm up to the likes of these videos but at least I have something to look forward to:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www3.mercedes-benz.com/mbcom_v4/us/c-class-coupe/en.html" target="_blank"&gt;Mercedes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://thewildernessdowntown.com/" target="_blank"&gt;The Wilderness Downtown&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.survivetheoutbreak.com/" target="_blank"&gt;Survive the Outbreak&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h3&gt;My Interactive Video&lt;/h3&gt;&lt;br /&gt;FYI: The buttons work even if the video hasn't buffered yet, just look at the progress bar.&lt;br /&gt;&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/script&gt;&lt;script&gt;    $(document).ready(function() {        $('#link1').click(function() {            var video = document.getElementById("theVideo");            video.currentTime = 0;        });        $('#link2').click(function() {            var video = document.getElementById("theVideo");            video.currentTime = (video.duration - (video.duration * 0.666));        });        $('#link3').click(function() {            var video = document.getElementById("theVideo");            video.currentTime = (video.duration - (video.duration * 0.333));        });        $('#link4').click(function() {            var video = document.getElementById("theVideo");            video.currentTime = video.duration - 1;        });    });&lt;/script&gt;&lt;style&gt;    #link1, #link2, #link3, #link4 {        position: absolute;        height: 75px;        bottom: 0;        width: 100px;        z-index: 100;        color: #000;    }    #link1 {        background-color: #0000ff;        left: 30px;        color: #fff;    }    #link2 {        background-color: #ff0000;        left: 135px;    }    #link3 {        background-color: #00ff00;        left: 240px;    }    #link4 {        background-color: #ffff00;        left: 345px;    }    #theVideo {        position: relative;        z-index: 50;    }    #container {        position: relative;        height: 445px;        width: 480px;    }&lt;/style&gt;&lt;br /&gt;&lt;div id="container"&gt;    &lt;div id="link1"&gt;        Jump to Beginning of movie&lt;br /&gt;    &lt;/div&gt;    &lt;div id="link2"&gt;        Jump 1/3 of the way into the movie.&lt;br /&gt;    &lt;/div&gt;    &lt;div id="link3"&gt;        Jump 2/3 of the way into the movie.&lt;br /&gt;    &lt;/div&gt;    &lt;div id="link4"&gt;        Jump to End the movie.&lt;br /&gt;    &lt;/div&gt;    &lt;video id="theVideo" width="480" height="360" controls="controls"&gt;&lt;br /&gt;        &lt;source src="http://dl.dropbox.com/u/63312280/LoversInADangerousTime.MP4" type="video/mp4" /&gt;&lt;br /&gt;        &lt;source src="http://dl.dropbox.com/u/63312280/LoversInADangerousTime.ogg" type="video/ogg" /&gt;&lt;br /&gt;        Your browser does not support the video tag.&lt;br /&gt;    &lt;/video&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;For my next experiment into HTML5 video, I'm going to do some more research into the canvas to see if I can't make the buttons right within the video.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6447937380359725712-942244426314127960?l=www.steven-smith.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.steven-smith.net/feeds/942244426314127960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.steven-smith.net/2012/02/interactive-html5-video.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6447937380359725712/posts/default/942244426314127960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6447937380359725712/posts/default/942244426314127960'/><link rel='alternate' type='text/html' href='http://www.steven-smith.net/2012/02/interactive-html5-video.html' title='Interactive HTML5 Video'/><author><name>Steve S.</name><uri>http://www.blogger.com/profile/10235196063268851980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_EaCqBmYmUyw/SkKwippR3BI/AAAAAAAAABg/hjQ1hdrTSs4/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6447937380359725712.post-2665597058484806280</id><published>2012-01-06T13:04:00.000-08:00</published><updated>2012-02-21T08:17:16.747-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='design brains book'/><title type='text'>Making them click</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-3pe0WKxXSSk/TwdhYLiHFZI/AAAAAAAAAKA/EJm4-ICKoS0/s1600/book.jpg" imageanchor="1" style=""&gt;&lt;img border="0" height="320" width="248" src="http://1.bp.blogspot.com/-3pe0WKxXSSk/TwdhYLiHFZI/AAAAAAAAAKA/EJm4-ICKoS0/s320/book.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;I recently completed the book Neuro Web Design: What makes them click? by Susan M. Weinschenk (&lt;a href="http://www.amazon.ca/Neuro-Web-Design-Makes-Click/dp/0321603605/ref=sr_1_1?ie=UTF8&amp;amp;qid=1325880342&amp;amp;sr=8-1" target="_blank"&gt;link&lt;/a&gt;), and I must say that there are quite a few times throughout reading it that I would just stop and say "Mother F*****!". Why? Not because the book was bad, in fact the book was very good. No the reason I would say that would be because I'd realize that I'd been sucked into things online without me even being aware of it. &lt;br /&gt;&lt;br /&gt;I wont give away everything the book talks about, but I'll say what I'm taking away from it. &lt;br /&gt;&lt;br /&gt;&lt;ol style="list-style-type: upper-roman;"&gt;&lt;li&gt;Many of the decisions we make are unconscious ones. If we can engage the different parts of the brain then we can help facilitate unconscious decisions.&lt;/li&gt;&lt;li&gt;Humans are social creatures. We like to be connected to others, do what others do, and we need to feel like we belong. Adding social functions to sites can be very powerful tools. Ask yourself this, how many times have you bought something because someone you know told you it was good? Or how often do you watch videos on YouTube because they were located in the "Recommended" section of the site.&lt;/li&gt;&lt;li&gt;Knowing that something is scarce or only available for a short time increases your desire for that something.&lt;/li&gt;&lt;li&gt;Less is more.&lt;/li&gt;&lt;li&gt;If you want to sell something, list that item first.&lt;/li&gt;&lt;li&gt;Getting people's attention is very simple if you: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;Change things&lt;/li&gt;&lt;li&gt;Display food&lt;/li&gt;&lt;li&gt;Imply sex&lt;/li&gt;&lt;li&gt;Talk about "You"&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Attractive people make things they are advertising attractive (at least in our heads)&lt;/li&gt;&lt;li&gt;Unleashing emotions in people is very powerful, especially when people feel like they are about to lose something&lt;/li&gt;&lt;li&gt;Stories grab attention&lt;/li&gt;&lt;li&gt;Like the old saying goes "A picture is worth a thousand words". Use of pictures is far more memorable than text.&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6447937380359725712-2665597058484806280?l=www.steven-smith.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.steven-smith.net/feeds/2665597058484806280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.steven-smith.net/2012/01/making-them-click.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6447937380359725712/posts/default/2665597058484806280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6447937380359725712/posts/default/2665597058484806280'/><link rel='alternate' type='text/html' href='http://www.steven-smith.net/2012/01/making-them-click.html' title='Making them click'/><author><name>Steve S.</name><uri>http://www.blogger.com/profile/10235196063268851980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_EaCqBmYmUyw/SkKwippR3BI/AAAAAAAAABg/hjQ1hdrTSs4/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-3pe0WKxXSSk/TwdhYLiHFZI/AAAAAAAAAKA/EJm4-ICKoS0/s72-c/book.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6447937380359725712.post-7918950804091858068</id><published>2011-11-25T12:36:00.001-08:00</published><updated>2011-12-09T12:01:52.040-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='confrontation frustration boss'/><title type='text'>Confronting my boss...</title><content type='html'>&lt;div&gt;&lt;p&gt;&lt;b&gt;Disclaimer:&lt;/b&gt; While some of the comments I'm making in this post may portray my boss in a bad light, I actually believe he is an awesome man to work for and I respect him greatly. &lt;/p&gt;&lt;p&gt;For the most part, I am a fairly laid-back guy. I can typically deflect or vent most things that get on my nerves. Recently my parents were over for dinner and we somehow got on the conversation about how I don't really ever get angry. My spouse said that in the six years I've been with her, I've gotten mad &lt;b&gt;maybe&lt;/b&gt; three or four times. &lt;/p&gt;&lt;p&gt;Having said that, there was one occasion at work where, I didn't necessarily get mad, but had to correct a problem that really started to grind my gears. &lt;/p&gt;&lt;p&gt;My company had been the software developer for a fortune 500 company for nearly a decade and as with all good things, the contract eventually came to an end. Prior to the actual end date however, the general feelings towards the company we were working for was rather neutral to negative. As our company's role was being replaced by another software company, it was inevitable that people would begin making statements like "they're going to crash and burn without us". These did happen and had been for a little while (I even took part in them at times), but eventually it began to nag at me. &lt;/p&gt;&lt;p&gt;At the time I was a business analyst and my boss was the product owner. Together, we were both main contacts for the customer and as a result, both of us were responsible for being the representatives for the customer. While I hadn't really thought about it much until then, we were also the leaders of our team. And as a result, we should be leading by example. My boss had been the product owner for the team for the nearly the whole length of my near three years with the company at that point and obviously had much stronger feelings about the lost contract than I did. By extension, he was much more vocal about the choices they were making than me or anyone else on the team. &lt;br /&gt;&lt;br /&gt;A prime example was us being in a conference call with the customer, and after what we felt was a bad decision by the customer, my boss muted the call, began to harp on the customer to me about how bad of a decision they're making and then return to the call. These little angered complaints repeated a few times a day over the course of a few weeks was enough to get on my nerves.&lt;br /&gt;&lt;br /&gt;Since being under his wing, he's told me that anytime I have issues, whether they are coworker, HR, or externally related, that I could pull him aside and we could chat about it. Well one day I decided to take him up on his offer, and oh my, that was the most nervous I've ever been around him - and he was the same guy I took my internship interview with. During the conversation, I think I just plowed through what was on my mind... my face getting hotter and hotter the more I talked. I'm sure that my sentences began all running together as I just wanted to get it all off my chest and by the end of it, my heart felt like it was going to pound out of my chest... especially in the few moments he took to respond.&lt;br /&gt;&lt;br /&gt;I think what surprised me most was his reaction because A) I'm sure he wasn't really expecting that kind of talk, and B) no one likes to hear about bad things they are doing. But (if memory serves) what surprised me most was his first words back to me were "Thank You". He did realize that we (he and the team) were becoming rather unprofessional when talking about our customer. And like inappropriate jokes (ex. racial, etc), you get so used to them that &lt;b&gt;eventually&lt;/b&gt; you end up telling them to the wrong person... and you never want that when your trying to portray your company as professional.&lt;br /&gt;&lt;br /&gt;Having looked back on it, if we didn't have the open professional relationship we did, the meeting probably would have had to have gone through the "official channels" (you know, closed door meetings with HR who have meetings with the problem person later) and that probably just would have aggravated him. &lt;br /&gt;&lt;br /&gt;I suppose if there is a point to the story, it is that I hope everyone can have as open a relationship with their bosses as I did mine. Not only did it make working for/with him that much better, but it made dealing with workplace issues that much better. Also, speaking to your boss about problems with them is &lt;b&gt;hard!&lt;/b&gt; If you do find yourself having to go to your boss about something like that, make sure it comes out in a clear and professional manner... much clearer than I'm sure mine did.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6447937380359725712-7918950804091858068?l=www.steven-smith.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.steven-smith.net/feeds/7918950804091858068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.steven-smith.net/2011/11/confronting-my-boss.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6447937380359725712/posts/default/7918950804091858068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6447937380359725712/posts/default/7918950804091858068'/><link rel='alternate' type='text/html' href='http://www.steven-smith.net/2011/11/confronting-my-boss.html' title='Confronting my boss...'/><author><name>Steve S.</name><uri>http://www.blogger.com/profile/10235196063268851980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_EaCqBmYmUyw/SkKwippR3BI/AAAAAAAAABg/hjQ1hdrTSs4/S220/me.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6447937380359725712.post-452251289703875190</id><published>2011-10-31T15:55:00.000-07:00</published><updated>2011-12-09T12:08:40.410-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ie7 css :before jquery'/><title type='text'>CSS :before and Internet Explorer 7</title><content type='html'>Well, if your company is like mine, you have a requirement to support Internet Explorer and versions as old as seven. While supporting Internet Explorer isn't in itself a huge deal, attempting to use new-age CSS with Internet Explorer 7 is.&lt;br /&gt;&lt;br /&gt;For me, the CSS psuedo tags :before and :after are particularly useful. Many of the pages I've had to implement recently have included funky icons before menu items. While this wouldn't normally be a big deal as you would think I'd just add the image to the menu's HTML and be done with it. Well, that would work all fine and well except that we have custom built controllers that will automatically generate the menu for us. The reason for this is so that each user of our site can have their own custom made menu. So this is where the problem is: how do I add the funky images to a menu I cannot edit. The answer: Do it with CSS!&lt;br /&gt;&lt;br /&gt;I implemented the menu icons using the CSS's :before tag. And it worked beautifully in Firefox, IE8 and IE9; however IE7 displays nothing. So I did a quick Google search and &lt;a href="http://nanobox.chipx86.com/blog/2006/07/before-and-after-in-ie7-and-below.php"&gt;found&lt;/a&gt; that it is possible to do this in IE7.&lt;br /&gt;&lt;br /&gt;The keen observer will note from that page that the implementation uses the :first-child tag to apply the image to. The problem I observed with this was the image I wanted essentially became a repeating background for the menu item it was to be in front of. So to get around this, I decided to implement a little JQuery script to insert a new element &lt;b&gt;&lt;a href="http://api.jquery.com/before/"&gt;before&lt;/a&gt;&lt;/b&gt; the menu item.&lt;br /&gt;&lt;br /&gt;JQuery:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;$(window).load(function () {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ($.browser.msie &amp;amp;&amp;amp; $.browser.version &amp;gt;= 7 &amp;amp;&amp;amp; $.browser.version &amp;lt; 8) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var newP = document.createElement('p');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var newParaText = document.createTextNode("");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;newP.appendChild(newParaText);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$('#menu-item-selector').before(newA);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} &lt;br /&gt;}); &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;HTML (in an IE7-specific style tag):&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#menu-item-selector&gt;*:first-child { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;background: url('path-to-image');&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;height: 5px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;width: 3px;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;position: relative;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;padding: 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;margin: 0 0 0 10px;&lt;br /&gt;        }&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;By inserting a blank &amp;lt;p&amp;gt; before the menu item, the :first-child css would be applied to the P instead of the menu item. And the final result looked like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-jvDXAUpZcXI/Tq8uCJvTX0I/AAAAAAAAAIs/Y_BZWDqkAkY/s1600/menu.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 225px; height: 123px;" src="http://1.bp.blogspot.com/-jvDXAUpZcXI/Tq8uCJvTX0I/AAAAAAAAAIs/Y_BZWDqkAkY/s320/menu.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5669801070391680834" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I will note, I didn't feel this was the most graceful approach out there as it uses some of IE7's holes to work, but with our support for IE7 being dropped as soon as our user base drops below 5% on it (currently ~10%), I decided not to worry about it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6447937380359725712-452251289703875190?l=www.steven-smith.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.steven-smith.net/feeds/452251289703875190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.steven-smith.net/2011/10/css-before-and-internet-explorer-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6447937380359725712/posts/default/452251289703875190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6447937380359725712/posts/default/452251289703875190'/><link rel='alternate' type='text/html' href='http://www.steven-smith.net/2011/10/css-before-and-internet-explorer-7.html' title='CSS :before and Internet Explorer 7'/><author><name>Steve S.</name><uri>http://www.blogger.com/profile/10235196063268851980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_EaCqBmYmUyw/SkKwippR3BI/AAAAAAAAABg/hjQ1hdrTSs4/S220/me.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-jvDXAUpZcXI/Tq8uCJvTX0I/AAAAAAAAAIs/Y_BZWDqkAkY/s72-c/menu.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6447937380359725712.post-7187395543840619531</id><published>2011-10-28T13:50:00.001-07:00</published><updated>2011-10-28T13:54:12.415-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='introduction'/><title type='text'>About this blog</title><content type='html'>In order to better mankind or at least the lives of my fellow front-end developers, I felt it responsible of me to begin a blog as a placeholder for my various things learned in the I.T. world. While this will most likely focus on HTML, CSS, etc. There may be times where I deviate and talk about work-related things that were particularly awesome or troubling (I'll have one about putting my boss in his place soon!).&lt;br /&gt;&lt;br /&gt;So I hope you enjoy the contents of this blog and/or find them useful. I most likely did.&lt;br /&gt;&lt;br /&gt;Thanks for reading.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6447937380359725712-7187395543840619531?l=www.steven-smith.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.steven-smith.net/feeds/7187395543840619531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.steven-smith.net/2011/10/about-this-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6447937380359725712/posts/default/7187395543840619531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6447937380359725712/posts/default/7187395543840619531'/><link rel='alternate' type='text/html' href='http://www.steven-smith.net/2011/10/about-this-blog.html' title='About this blog'/><author><name>Steve S.</name><uri>http://www.blogger.com/profile/10235196063268851980</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://4.bp.blogspot.com/_EaCqBmYmUyw/SkKwippR3BI/AAAAAAAAABg/hjQ1hdrTSs4/S220/me.jpg'/></author><thr:total>0</thr:total></entry></feed>
