3 CSS issues I encounter with every layout
Posted by admin | Filed under CSS
Like many developers I’ve taken a PSD and created a website template from the image dozens of times. And like many developers I’ve got a set of steps that I follow each time. I also know that most developers have slightly different set of steps which is what inspired me to write how I solve three pretty common CSS issues I encounter when I create a website template. These aren’t original solutions, I’ve either read about them or been told about them by other developers. But they’re in my toolkit and I use them consistently without even thinking about them. To me they have become a part of how I write CSS and I realized after being asked a question about a CSS sheet I wrote that not everyone may have encountered them, especially those just starting out.
So here’s my top three (two are pretty standard and one is a little obscure). I’m sure there are many more, feel free to add yours in the comments.
Read the rest of this entry »
New for 2009
Posted by admin | Filed under Ramblings
It’s now 3 months in to 2009 so this post isn’t quite as timely as I’d like it to be but I got my shiny new MacBook Pro 2 weeks ago and it inspired me to write about some of the new technologies I’m hoping to play around with this year.
Explore the Gaia Framework
I’ve never used a Flash framework, in fact this is the first one I’ve heard of. When I build a Flash site my least favorite part is always sitting down and planning out the loading structure. Where the data is coming from, when its going to load etc etc. It’s dull, repetitive and takes away from all the fun creative interface creation I enjoy so much BUT it’s very important to consider unless you want to have a crummy sluggish site. In the past I’ve written my own loading classes and used existing classes (ie: BulkLoader) but after reading about Gaia I’m excited to see how they handle loading and other typical Flash site needs ie:transitions. Oh, and bonus points because it plays nice with SWFAddress and TweenLite! Two Flash classes I can’t live without.
Take Flash IK for a Test Run
One of the main reasons I upgraded my computer was so that I could run the new CS4 suite. My old TIBook just couldn’t handle Adobe anymore. Now that I have CS4 I’m looking forward to running through a few tutorials on IK and rigging a few objects/characters.
Make a Layout Using CSS Tables
Now this probably won’t happen on any professional work just yet but I’ve put off working with CSS tables for awhile now. In my 9-5 good old IE6+7 make up over 70% of our users in most cases so using CSS tables for <30% of users doesn’t quite justify it for me just yet.
Well there’s three of many new techniques/skills/tools I’m hoping to get familiar with this year. I just hope I can find enough hours in the day for everything!
Tags: CS4, CSS Tables, Flash, Gaia, IK
Don’t forget the wordWrap!
Posted by admin | Filed under Flash
Quick post time. I was working in Flash today creating some text fields at run time and populating them with text. I set the width, made it multiline and then dropped in the text using code similar to the snippet below.
var contents = new TextField();
contents.width = 300;
contents.multiline = true;
contents.text = myData;
Tested the movie and shocker, the text was not multiline! Confused I read the lines over and over again, changed the order in which I declared the multiline value and then it hit me, word wrap! By default the wordWrap value in Flash is set to false, this forces all the text on one line no matter what the multiline says. By adding a simple wordWrap = true everything displayed as intended.
var contents = new TextField();
contents.width = 300;
contents.wordWrap = true;
contents.multiline = true;
contents.text = myData;
I’m not sure why I always forget the wordWrap but next time I do hopefully I remember I wrote this post!
Tags: AS3
IE7 Double Padding on Clearing DIVs
Posted by admin | Filed under CSS
About a week or so ago I encountered a new CSS issue that only was present in IE7 that I was surprised I hadn’t run in to before. Actually I was more surprised to encounter an issue that was only present in IE7 and fine in IE6. Maybe its just me but those bugs seem few and far between.
I was doing a simple two column layout and using my footer to clear the two columns which were floated left. Easy enough. The problem came in to play when I added some padding to the top of my footer which when displayed in IE7 was doubled. Right away my mind jumped to the well documented double float margin bug present in IE6. The solution to that one is to add “display:inline” to the float container and all is well. Unfortunately that did not work in this case BUT a small adjustment to “display:inline-block” did the trick.
Before:
#footer{
clear:both;
padding:15px 0;
width:800px;
}
After:
#footerBox{
clear:both;
display:inline-block;
padding:15px 0;
width:800px;
}
When implementing the solution on actual site files I prefer to apply the “display:inline-block;” rule with conditional commenting. However having the rule in the main CSS does not appear to cause conflicts in any other browsers I test on (Safari, Firefox, IE6) so its a matter of personal preference. Personally I strongly dislike IE and relegate all IE specific fixes etc to their own CSS that is included via conditional comments.
Tags: browser compatability, CSS
I <3 WPLite
Posted by admin | Filed under Web Dev
I’m a big fan of WordPress and I just found my new favorite plugin, WPLite. As much as I think WordPress is user friendly and very intuitive the non-techy user often seems to have trouble navigating the menus.
Enter WPLite.
This nifty plugin allows me to login and disable individual menu items as well as specific sections of the post meta, ie: categories, tags or custom fields. It even works with other plugins so you can hide the options/settings menu of a plugin but still allow access to the front end. I do this frequently with the Event Calendar plugin. If you’re looking for an easy way to strip down the WordPress admin area beyond what the predefined roles give you then this might be a lifesaver.
Is Ruby the next big thing?
Posted by admin | Filed under Web Dev
I’ll admit it, I thought the Ruby on Rails framework was going to be a fad that faded away within a year or two. However it’s still here, and while I’m not sure I’ve warmed up to Rails i’ve gotten a little more curious with it’s big brother Ruby. Now I have no hands on experience with Ruby it just seems as though its come up in conversation more recently that this time last year. My headhunter friend has frequently asked if I know any Ruby programmers.
Just for fun I played around with Google Trends this afternoon to see if in fact people are searching for Ruby any more now than they were a year ago. In an effort to ignore searches for “ruby” the gemstone versus Ruby the programming language I formatted searched for the phrase “ruby programming”. I don’t claim these results really show an accurate gauge of programming language popularity (check link for that) but it was a fun experiment. I threw in PHP and Python for a comparison but left out the big guns ie:Java, it just didn’t seem fair to compare Java to Ruby.
I’d describe the graphs as “slow and steady”, while there didn’t seem to be any notable influx of changes I found it interesting how close Ruby and PHP results appeared in the United States. Event more surprising to me was that Python presented considerably higher search popularity than PHP in 2008. Maybe I should have titled the article “Is Python the Next Big Thing?”.
Tags: php, python, ruby, trends
Relative Classpaths in AS3
Posted by admin | Filed under Flash
I’ve been working in AS3 for about a year now and everyone in awhile I slip and use an AS2 property reference, for example ._alpha vs .alpha. The other place I find myself slipping is with classpaths. I work in a SVN development environment so it is important that all classpaths are defined relatively so they work across machines.
For simplicity’s sake here’s a sample of a very basic small Flash project.

In AS2 I would set the classpath as “classes/” to have access to the MyClass.as file in my project.fla.
In AS3 that doesn’t fly and the classpath must be set as ”../myProject/classes” or “./classes”. I’m not 100% clear on why “classes/” no longer works as all three paths seem the same to me, but suffice to say this caused a fair share of headaches when I first made the jump to AS3.
Flash 40 AJAX 3.2?
Posted by admin | Filed under Web Dev
The numbers in the title refer to the percent of web sites on the internet that make use of Adobe Flash and the percent of websites that utilize the XMLHttpRequest to calculate the AJAX figure. I came across these in an article over at Flash Magazine which referenced a survey done by the people over at Opera.
These numbers took me by surprise, maybe its the sites that I visit but I had the impression that AJAX was taking the web by storm. It’s this perception that prompted me to cut my time in the AS3 world and spend some time getting more familiar with AJAX techniques and my favorite Javascript Library, JQuery. I will continue utilizing both technologies but I just found it ironic to say the least that during a time where I’ve been very AJAX-centric that a report comes out showing such a strong flash prevalence. Then again it could simply be inflated by all those horrid “punch the monkey” banner ads.











