Been having lots of fun lately trying to get fluid JavaScript column layouts working on the new Jumpstart website.
We were inspired by www.michaelpaulyoung.com and www.wolffolins.com amongst others to try and create a design agency site that breaks the standard (and totally overused) ‘home, about us, our people, our thinking’ type tosh that you normally get.
Michael Paul Young has turned a simple WordPress Blog into a fullscreen fiesta of fixed width columns. It has some lovely jQuery fade transitions but the real star is the site’s ability to present a full screen, fluid layout that really does work on any screen space. Obviously it helps that he has some killer work to show off but hey, we’re a digital design agency right? No problemo.
The basic structure is fairly straightforward. A series of 245 pixel wide columns (the precise number dictated by how wide the window object is), all floated left with CSS. Within the columns are content ‘boxes’ of varying heights that combine to present a full screen appearance – regardless of screen resolution or window object size.
There is a natty Jquery drop-down menu (love the way it pushes the content below it down on opening) and the logo block strands two columns but the overall effect is a kaleidoscope of content ordered by date rather than some arbitrary categorisation. If you need to filter the items to help you find what you want then you can do this and only show, say, logo work, if that’s what you want.
The truth is most visitors to a design agency site don’t know what they want in specific terms. They want to see your work and who you do it for and a few reasons why they should use you and not the million other options available to them.
So how does it work? Well, the columns are all floated left and within a CSS ‘wrapper’ given absolute positions from the left and top margins. So you get:
column 1 – left: 245px
column 2 – left: 490px
column 3 – left: 735px
etc.
We’ve allowed for up to 10 columns (if you have a screen resolution greater than 2450 pixels and you view your sites full screen then you must have a pretty strange web browsing experience anyway). We then hide all the column DIVs with display: none; CSS.
The cool bit is a JavaScript function that calculates the available screen real estate and shows only the columns it can accommodate. The columns are absolutely positioned to avoid the last column wrapping underneath when it slightly overhangs the available space. This provides a much nicer full screen effect.
Next we have all our content in a hidden UL list. The JavaScript loads the content items into an array and then ‘deals’ them out one by one into the available columns – just like a croupier in a casino.
The effect is run on page load and resize so you always get the full screen effect. We’ve decided to fix the columns for very low resolutions but there is no reason why you couldn’t just have a very basic consistent column layout – would look cool on an iPhone.
We had a few issues with the way Internet Explorer deals with a screen resize event but hey, no surprises that I.E. was our main headache, right?
Anyway the site should be live by end of June and will be on www.jumpstartdesign.com if you see the Flash version it is not live yet. Anyone interested in the code can email me for a copy.