Google Chrome Browser Thoughts

For years we have been accustomed to the tabbed browser interface and how helpful this is to manage your browsing sessions. This trend in software has been so successful that its hard to imagine a browser without these tabs. There is no doubt that while viewing a large collection the potential it has to start tying up your computers resources and may not entirely give them back when you’ve closed the tab either. Another concern is that when one tab has a problem processing a request, your browser will likely crash and take all of your other tabs with it if you’re not careful!

Its almost been a week now since Google’s new Chrome browser has been released to the public and from what I’ve been seeing, the response has been overwhelmingly good. While its too soon to tell how much adoption the new browser will have especially to your average web user, if this past week is any indication of this then we may have one serious contender on our hands.

The idea behind the new browser was Google’s acknowledgment of how much time we spend online conducting our daily business, whether it be online banking or sending email. Sites are being developed now that are capable of performing much more complex tasks than we would have ever imagined 15 years ago when web browser were first introduced. This realization has given way to finding a better browser architecture capable of dealing with the high demands of sites such as online word processors, airfare booking, maps and many other types rich internet applications.

So I guess the more important question is should you be using Chrome in its current development state? Do you like to jump in feet first and test the waters with a whole new experience? Are you not concerned with bugs, incompatibilities or worse.. potential security holes? Then by all means, this is your browser. Now don’t get me wrong, this isn’t trying to imply that there is anything wrong with treading new ground and pushing new technology. For myself though, I’ll be mostly using Chrome as a fun new toy to experiment with rather than migrating over entirely. What I’m really interested in seeing is what will come out of the open source community that is actively working on the browsers core which I believe in time that we will see great things come out of the chromium project which powers Chrome. While there is no certainty that Google Chrome itself will come out on top when its all said and done, but there is no denying that it will be known as the browser that was at the forefront of a new undertaking in how we think about today’s web applications.

Introduces a new way of thinking about how browsers work
Innovate way of handling complex websites with V8 JavaScript rendering engine (complied)
The UI is simplistic (the browser should be transparent)
Everything is open source!

Google is a company that is best known for it’s services NOT it’s software.
The UI is simplistic (I miss having my firefox plugins at my disposal)
As if web developers need one more browser to test on
Too early to tell its adoption rate


Clearing CSS Floats

Here’s a quick tip that will be useful for dealing with content that “overflows” outside of the normal boundaries. Any web designer I’m sure has encountered this issue at some point or another and you may be surprised to find how easy it is to correct. In this example we have an outer div “main content” area in green with a gray div “column” floated to the left with more content than the area will contain given the column’s width. As you can see in the example, the result is that the floated column extends beyond the lower boundaries of the outer div. This is less than ideal, especially when your site’s content is generated dynamically.

CSS Content Overflow

This first solution has stood the test of time and is known as the clearfix method. This technique uses the :after pseudo-element which is supported by CSS2 compatible browsers. Unfortunately, this doesn’t include Internet Explorer 7 and below. You may notice that there is actually two style blocks for our CSS and that is because we are using conditional comments that will target any Internet Explorer browser and use the proprietary hasLayout CSS attribute that must be commented or else your page will not validate.

<style type="text/css">

  .clearfix:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden;

</style><!-- main stylesheet ends, CC with new stylesheet below... -->

<!--&#91;if IE&#93;>
<style type="text/css">
  .clearfix {
    zoom: 1;     /* triggers hasLayout */
    }  /* Only IE can see inside the conditional comment
    and read this CSS rule. Don't ever use a normal HTML
    comment inside the CC or it will close prematurely. */

View Example #1

Another method uses an additional <div> element on the page with a style of “clear:both” which will force your container to accommodate the cleared element. While just as effective as any of the other methods, there is the concern of adding additional “meaningless” markup to your pages.

<div id="outer">
    <div style="clear: both;"></div>

View Example #2

Finally there is a relatively newly discovered technique which is quite easy to implement and is one which doesn’t require additional markup. It simply involves adding a “overflow: auto” property to the outer <div> element.

Half an hour of testing later, I was amazed to find Paul was 100% correct – as this example shows. It seems that reminding the outer <div> that it’s overflow is set to ‘auto’, forces it to think “oh yeah.. I’m wrapping that thing, aren’t I?”.

Alex Walker,

View Example #3

So there you have it, three different techniques that will help you clear all of those pesky float issues.


Creating online forms with Google Docs and WuFoo

Designing the login form was one thing, but how about if you wanted to create something a little more lengthy and use it to obtain meaningful data from your readers. Well you may just find what you’re looking for using Google Doc’s new form builder. This is just one of the products that Google offers as part of their online productivity suite. As always you will find that the interface is clean and only takes a couple minutes to understand how to get it up and running. You can also specify required fields which is a nice touch.

The form results are displayed to you in a nice pie chart. The actual data is output into a spreadsheet behind the scenes if you need to use it for any other reason which is a nice touch as well.

An alternative service that I also recommend is called WuFoo. This service is free to try and allows for further customization of your web forms. I kid you not when I say that seemingly everything that you could ever want is included with this service such as phone number and date fields which include custom validation messages built in. There is a monthly fee as your usage increases however.

For me personally, Google Docs does just fine for my needs. Feel free to give your ice cream preference if you’d like to try out a sample form.


Creating a login form with jQuery

View Demo

Creating a login (or any form for that matter) can be trickier than it looks. After all how difficult can two text boxes a button and some labels be? There are different ways to accomplish this task, some using more proper semantically correct markup techniques than others. This example will attempt to give a real world case of how easy it can be to target elements contained inside the form with minimal scripting using the jQuery framework.

We’ll first start out with some html markup, notice the lack of css class attributes or JavaScript event handlers present.

	<legend>Log In</legend>
	<p id="loginResult">Invalid login.. try again.</p>
	<form id="login" method="post">
			<dt><label for="username">Username:</label></dt>
			<dd><input id="username" type="text" /></dd>
			<dt><label for="password">Password:</label></dt>
			<dd><input id="password" type="text" /></dd>
		<p><input type="submit" value="Login" /></p>
	<small>u:username / p:password</small>

The next step we take is to target each element down the list and assign it a css class. We do this by using jQuery’s element specific selectors :text and :submit.

		$('form#login :text').addClass('inputTextbox');
		$('form#login :submit').addClass('inputSubmitBtn');

Next, we’ll add the event handler for the submit button by using .click(). To make things easier on ourselves we could always shorten our code by chaining the click event at the end of our submit button selector which was already defined in the previous step.

$('form#login :submit').addClass('inputSubmitBtn').click(function() {
     // click event code

Throw in an animation for good measure to display a message for invalid attempts and you’re good to go. Here is the full JavaScript code we’re working with.

			$('form#login :text').addClass('inputTextbox');
			$('form#login :submit').addClass('inputSubmitBtn').click(function(){
				if($('#username').val() != "username" || $('#password').val() != "password")
						$("#loginResult").animate({opacity: 'toggle'}, 500 );	
					return false;

Upcoming Events for Web Developers

An Event Apart
August 18–19, 2008 San Francisco, CA & October 13–14, 2008 Chicago, IL

Join Eric Meyer, Jeffrey Zeldman and special guests to gain a deeper understanding of web standards and emerging best practices. Be inspired by fresh ideas and new directions. Join the greatest minds and hottest talents in web design today.

The Ajax Experience
September 29 – October 1, 2008 in Boston, MA

The only Web 2.0 development event created by developers, the real experts working in the trenches who have encountered and conquered today’s most pressing pain points. The Ajax Experience is the original and most in-depth rich internet application conference addressing cutting edge topics, from cross-browser compatibility to how to choose the right framework and everything in between. We bring you sessions on performance, scalability, server-side and client-side development, and JavaScript from industry experts who face the same day-to-day challenges as you do. Whether you’re a designer, developer, tester or manager, The Ajax Experience provides you with sessions to take your skills to the next level and enhance your professional development. Guaranteed.

Future of Web Apps
October 8-10, 2008 in London (San Francisco and Miami have also hosted)

The Future of Web Apps showcases the successful web technologies and business trends of the future, delivered by the pioneers of today. Attended by all the major European and US start-ups and industry experts, it’s the best place to learn directly from the developers, designers and entrepreneurs behind the web’s brightest stars in a relaxed and fun environment.

The Future of Web Design
November 3-4, 2008 in New York, NY

Join world-leading web designers in NYC for one day of inspiration, advice and best practice.

(SXSW) South by Southwest Interactive
March 13-17, 2009 in Austin, TX

The SXSW Interactive Festival features five days of exciting panel content and amazing parties. Attracting digital creatives as well as visionary technology entrepreneurs, the event celebrates the best minds and the brightest personalities of emerging technology. Whether you are a hard-core geek, a dedicated content creator, a new media entrepreneur, or just someone who likes being around an extremely creative community, SXSW Interactive is for you!

Mixx 2009
March 18-20, 2009 Las Vagas, NV

MIX is an ongoing conversation between web designers, developers, and business decision makers. We showcase topics and solutions that bridge Microsoft and non-Microsoft perspectives, and emphasize the inclusive and participatory nature of the next web.