Thursday, April 22, 2010

LIF2 pretty much there...

So, I haven't felt very chatty over the last week but that doesn't mean I haven't been a busy bee...

In and around busy work days, networking drinks, job hunting, barefoot running, 6am yoga classes and accidentally discovering a love of smoting in Age of Empires II, I have pretty much finished off LIF2. I tried to address the SEO concepts covered in my last blog post by adding in the non-repetitive key words & meaningful meta and title tags, I got rid of the extra old versions of the site floating around out there (except for the prototype site that I built for my uni assignment which is part of my academic portfolio...). I also set up a subdomain for the client so we can move the blogger-hosted blog over to the website (just waiting for the client to redirect the blogger site before I add in the link to the nav bar), hopefully all of which will giving it a greater hit rate and be better spotted by search engines...

I've also been cross browser testing and tweaking. It now looks good in Safari 4, Firefox 3.6, Chrome and IE 7 & 8. I chose not to cover IE6 - I know a massive proportion of peeps might still be using it, but they aren't most of the site's visitors (based on Google Analytics) and they must be starting to get used to things looking a bit odd in it these days anyway, now that so many major sites are no longer supporting it. (note: I'm cringing as I type this - the OCD part of me doesn't like such slack control over how people might see my work. It actually doesn't look bad at all in IE6 - there's a margin out here or there but nothing horrendous. Give it a week and I bet I can't help myself revisit this...)

The biggest hassle I had was trying to get things to work in IE7. I know I've cursed IE in previous posts (and trust me, I was doing so again prolifically in this current tweak job) but MS have added back a few brownie points on my kudos score board by including the compatibility view in IE8 (not to mention the built in dev tools - not as good as FF's but a handy inclusion!). It was great having to not try to install the two on the one machine, and just flick between them as I tweaked (as I'm still having zero joy with free cross browser test websites).

In the past I've built a separate IE style sheet but I decided this time to just add in what I imagined would be a couple of small hacks, based on the fact IE8 already looked fine. I employed the * CSS hack described in a very handy Nettus tutorial to target IE7.

I thought it was only going to be a matter of adjusting a few margins/padding/width values here and there, but it turned out to be a good chunk of a day just trying to figure out what the hell was throwing everything out. As it turned out, I discovered IE7 doesn't play well with floating objects (and doesn't read clear:both) - particularly when there are two floats on opposite sides of a div, which I had used in a couple of spots, including the header div. Much trawling of the internet didn't bring me much joy re providing a quick solution - among many things I tried shifting the padding to the parent element, removed floats and tried to have the divs display inline etc (I can't even recall everything I tried last week - I think I've blocked it all out). Anyway, I ended up finding this article that suggested absolute positioning as a potential solution to the problem. I was a bit wary of trying this - I'm not a fan of commitment at the best of times and I don't like the idea of something stuck in an exact spot - which I thought might go horribly wrong in the wrong browser/window size etc. I'd tried everything else so I gave it a go - well, I typed in *position: absolute, and gave the div a width, and it just sprung into place! I didn't actually have to give it coordinates. After that it was just a matter of a few padding adjustments and tweaks to font sizes, and the site was good to go in IE7!

So that's pretty much it for LIF2 (or will be once the blog has transferred over and the site goes live). I'm still stalling re launching into Flash by revisiting the site and tweaking here or there. Which I need to stop doing. Maybe I can build the site a Flash banner...

No comments: