-webkit-scrollbar on OS X

In a recent project I noticed something peculiar happening to scrollbars in webkit browsers on the Mac and decided to investigate. Here is a problem and the solution.

Compare scrollbars

I was having an issue where a <div> had it’s overflow set to scroll. It was a twitter feed that we wanted to cut short visually but when we implemented it, we noticed on my machine the scrollbar wasn’t visible while on my¬†colleagues, it was. Same machine, same software, same settings. Note the image on the right, you’d have no idea content had been hidden. OS X briefly flashes a scrollbar on the page but you’re unlikely to see it.
Continue reading -webkit-scrollbar on OS X

Fixing the Hover event on the iPad/iPhone/iPod

Note: This information may now be out of date. It was published in 2010!

In truth it’s not a fix as the iPad doesn’t have the ability to hover.

Apple has developed extra events to replace hover on it’s mobile touch devices. I’ve recently been working a lot on the iPad and came across the problem of hovered navigation not showing up. It’s a css :hover event that fires through a CSS selector on an <a> element with no href attribute.

To emulate the hover we simply add an event listener to the element we want to have a hover event. In jQuery we do this (make sure you insert it into document.ready):

//ipad and iphone fix
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
    $(".menu li a").click(function(){
        //we just need to attach a click event listener to provoke iPhone/iPod/iPad's hover event
        //strange
    });
}

That should enable the element to be touched, and stimulate and iPad hover event.

If you’re having problems getting hovered elements to fire you could also try using touchstart or touchend which is probably a better method depending on what you’re trying to accomplish:


if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i))) {
    $(".menu li a").bind('touchstart', function(){
        console.log("touch started");
    });

    $(".menu li a").bind('touchend', function(){
        console.log("touch ended");
    });

}

Developing for multiple browsers *sigh*

I know it’s unfortunately the “taboo” of modern website design, but many developers don’t want to simply leave their IE7 visitors and IE6 visitors in the dark. It’s fine for sites like this one, or for web applications but what about corporation websites? For sites that HAVE to support older/alternative browsers. This came to light ever more when I recently worked on a website which would mean that customers worth millions could possibly be using IE6. There’s 50% of employees there too who still run IE7 so not supporting them wasn’t an option. I needed (and used) a large set of tools to help me accomplish this task, and I’m going to tell you about them.

Every web developer should (and probably does) use these tools on a daily basis. They streamline your development and help speed up little niggles with your site. Continue reading Developing for multiple browsers *sigh*

University is over! (for a year anyway)

Stamps

So University is done and dusted for 2009. I won’t be returning until September 2010 which makes for a nice break. In the end I got my grades (A,A,B,B,B,C) which I was very happy with. To top all this off I thought I’d showcase some of the work I did to receive these grades.

Visual Design (B Grade)

Plugs
I’ll start with a Module I didn’t thoroughly enjoy this year due to boring briefs, however, I did a little bit of illustration for it which included some postage stamps, posters and even included some Video in After Effects. You can see the video, the illustrations and the posters over at http://turnitoff.info/ (the posters reside in the footer of the page)
The site was built using the latest in Javascript and jQuery technology so check it out, hover over the elements, play with the buttons. Your probably better off using FireFox too, as IE couldn’t really handle it’s superior web modernness. Make sure you check out the video at the bottom of the website too (yes that is me speaking sounding common as muck).

For Visual design I also illustrated the stamps shown in the header image. It’s based on Music Technology over the years and I think I captured the best four from the past century or so. You can see them in all their vector glory too.

WebsiteMultimedia Product (C Grade)

This was a complex one, which also means I can’t demonstrate it online. The idea was simple, Unique Bidding auctions.

The site featured a worlds first in online bidding. Live real time bidding in auctions. You could actually watch LIVE bidders placing their respective amounts on the page as it went along. This meant users could bid against each other based on other users’ bids. Clever eh! It was all jQuery and PHP grabbing the data from a database. It was awfully complex and also included a 10,000 word document explaing the process and research behind it. There was also a very fancy presentation which explains the fundementals if anyone wants to watch it. Its the branding, the functionality and the UI all rolled into a short few slides.

It also had it’s own iPhone web application which tied into the whole site shwoing live bids from anywhere in the world at any time.

Web Programming (A grade)

Another interesting one. And one which I actually really enjoyed.

guestAssignment one involved building a file based Guestbook with full admin features, the ability to edit posts and delete them, a swear word filter to stip out those naughty words and a slick simple UI. It also had AJAX editing of comments right in the page. No loading, no navigating, just click and change! I think you can guess what Lady Part and Ping Pongs were supposed to say! It maybe available as a free download if anyone is interested in the future.

Assignment two was a dog database website. Very similar to Battersea dogs homes website. It needed full admin controls and the ability to save dogs as favourites and have the ability to search the dogs too. The brief was very extensive, and I covered everything. Check it out online right now. I ended up building a commercial site based on this for Cliffe Kennels.

Authoring (B Grade)

It was basically Actionscript 3.0 work. For assignment 1 I had to develop an interface which included an animation, using the drawing API and the components within Flash 8. I ended up building a Spirograph kind of application which allowed you to colour it yourself and watch the application build it for you. Very nice! Have a look at it. I also built a flash gallery using XML and class files. But it’s not something I have online at the moment.

Multimedia Design & Production (A Grade)

This is a group project, and something which is a real challenge working with four different creative minds. My University chum Chris Kovalenko was part of our A grade group which created a chairty website and CDROM called the West Yorkshire Autistic Society (completely fake). Check out the site.

Intro to Video (B Grade)

My mate Adam Fisher helped me out with this one as I couldn’t star, edit and film the whole video. He rode the bike, I edited it, The Chemists supplied the music. It actually works quite well for my first every video. So I’m quite happy with it as a 2nd year project.

That’s it! I hope this gives someone some kind of inspiration either for university or for their next project. If it did help you in any way shape or form, drop me a comment!

IE8 Adverts

I LOVE the new IE8 adverts. They feature that guy from The New Adventures of Superman (Dean Cain). It’s a shame I’m a FF3.5 user and IE8 is fourth in my list (behind Safari & Opera) of browsers to use. They are brilliant though.

I have gritting rage!. Download Firefox then you plonk. :D

Additionally I have omitted the “Puke” advert as it wasn’t that funny (and kinda horrible to watch). But you can still watch it anyway.

The things that annoy me about iPhone 3.0

Don’t get me wrong, the new updates for the iPhone are a much needed modification for the device. Cut/Copy & Paste, Tethering and MMS are all things which should (in my opinion) have been on the phone from the very first incarnation. These things were standard on even the most basic of modern phones.

Apple have played it clever. They brought out an amazing phone and missed out a lot of the basics. The annoying thing though is the fact that Apple is shouting about simple things such as “Read and write texts, emails and picture messaging holding your iPhone sideways.“. Wow! “Cut Copy Paste, Move text, numbers, email addresses between apps“. Honest to god these are not major selling points for the new iPhone software so why flaunt them? To say these are only 2 of the most flaunted updates how good can the other 98 be? Thank god Apple have updated the website today to show the other top features such as the search function, stereo bluetooth and the new language support.

Overall I’m happy with the new update and look forward to installing it next Wednesday (June 17th) but I can’t help but feel Apple have been deliberately holding this off for 2 years just to drum up a bit of cash/publicity. Classic Apple/Jobs, and to be honest, it’s worked on me, as ashamed as I am to say it, I’ll probably be on the phone to o2 next week about upgrading to the 3G S (which is a crap name by the way). :-D

Google Chrome

 

With the release of Google’s new web browser named “Chrome”, will this mean a shift in browser usage?

It’s the same situation as Firefox found itself in nearly four years ago, and it’s only just catching Microsofts browser.

So, is Chrome any good? I downloaded the BETA yesterday and have been playing ever since.
I am pleased to say it’s extremely fast. It features a new open source Javascript Engine named “V8″ as well as multiple tab processing. This means the browser can handle processes from each individual tab rather than processing the lot at the same time, which competitors such as Firefox 3 and IE7 do (IE8 BETA has a similar system to Chrome).

Although it may take up a little more memory and power it ultimately makes for a faster browsing experience and more stability. If one of the processes fail you only lose one tab rather than the whole browser.
Firefox has a similar stability system included where it re-initiates your tabs after a crash. Google Chrome never has to close when a piece of dodgy Javascript breaks the tab. It just closes it.

Things I like in Chrome:

  1. The truely awesome Chrome Inspector
    A great debugging tool is built right into Chrome. Want to know what’s making your page load slowly? Not sure how long your page takes to load? Want to know which elements load first? This shows you the lot. You can see which order elements load, how long they take to load, how long it takes for each element to load after the previous as well as file information and the built in debugger and property inspector. You have to use it to truly understand it’s complexity. Simply click the control button, then down to Developer>Javascript console and click away!
  2. Incognito Browsing (and the awesome logo)
    It’s basically a porn mode. Very much like IE8’s new privacy feature. Upon opening this new “Incognito Window” all your history and web cookies won’t be stored meaning your basically invisible on the internet. It also means your mom/mum won’t find that dirty website you have been visiting over the past few days…
    I also love the “spy” logo very similar to Gamespys logo. It looks very cool for a Google graphic! (I also love the Chrome logo).
  3. The iGoogle like welcome page
    When opening a new tab you have the option of showing a “New Tab page”. It shows your most visited websites in order and also shows your full browser history with time and date. Clicking show full history actually allows you to see your online travel path. The new tab page also shows new bookmarks and recently closed tabs. A feature I like very much as losing closed tabs can be easy.
  4. Organised tabs
    When you have several tabs opened, keeping track can be difficult. And when Firefox adds your tab onto the end of the list it can be hard to find again. Google Chrome adds the tab next to the currently opened one, which helps keep them organised. The more tabs you have open at any one time, the harder it becomes to sort, and the more valuable this feature becomes.
    Click on the image to see a better example.
  5. Unobtrusive status bar
    This is a personal preference. The more browser space is available, the better. This means you can see more of the page at any one time. Even if it is 10px worth of space, every little bit helps.
    When hovering over links the status bar pops up in the lower left corner, then fades away when you move away from the link. Simple and effective.

To be honest I could write about the new Chrome all day, but I know that it’s already been well documented. Maybe I got a little carried away.

To download Google Chrome simply head over to their website.

Microsoft releases IE8 Beta II, try harder!

This week sees Microsoft leave behind the IE7 which had lasted for two years, and announces the second beta of IE8, but does more effort need to be placed on getting users to actually upgrade, rather than adding another version number to the mix?

According to W3.org there are more or less the same amount of users toddling along with IE6 as there are IE7. IE6 is seven years old yesterday (27th) and still holds a market share of around 25% while IE7 holds 26%.

Firefox is steadily climbing up the browser tree holding 42%, and nearly all of those users are on the latest version (or there about). Why is this? Do Internet Explorer users not bother? Is it too complicated? Or is it even due to piracy? After all, if you have an illegal key, you won’t be able to upgrade. Let’s make a few points and ask some questions… Continue reading Microsoft releases IE8 Beta II, try harder!