5 ms·
The Perfect 3 Column Liquid Layout
- edw519 18y agoWhenever someone posts one of those "How to you like my app" posts, and I have to scroll horizontally, I mention it. And I usually get shouted down. They tell me to "graduate" from 800 x 600. My argument has never been that any resolution is any better than any other. It's been that your app should work no matter what resolution your visitor arrives at. This article is one excellent solution to that problem.
- pxlpshr 18y agoThe counter-argument to liquid-layouts is the fact that you need to specify a min-width which is not supported in all browsers (easy fix for jscript sure, but certainly not hack-free). So for individuals like myself, who run at 1920x1200, legibility is a significant issue unless I manually resize my browser window which is about as much of a pain in the ass as scrolling horizontally. Sadly, there is no perfect solution when designing for the web. Horses for courses.
- cdr 18y agoAt that resolution, you'd be somewhat insane to maximize your browser window. You should be using software that divides your screen into regions.
- pxlpshr 18y agoIn OSX, the layering nature of windows to make drag-n-drop more usable sometimes becomes counter-productive. There are times when I find I just want to focus on a single item and block everything else out, which forces me to either maximize Safari, or close down all my applications. I don't care for Spaces too much right now, it's kind of buggy with Photoshop/Illustrator.
- qwph 18y agoIf you haven't already, you might want to give Think a try. It runs on OS X and might be exactly what you're looking for. http://freeverse.com/apps/app/?id=7013 http://freeverse.com/apps/app/?id=7013
- benmathes 18y agoI'm a fan of the multi-monitor model. Two 20" LCDs are often cheaper than one 40" (not the same area, I know) and can be much more useful. My typical setups are: screen one: rotated vertical with code screen two: horizontal with command line and the app splitting horizontal real estate. -------------------------- screen one: full-sized game screen two: web browser and IM client
- xirium 18y ago> min-width which is not supported in all browsers There's a very simple workaround. Reference a transparent, one pixel image and specify the desired minimum width.
- thaumaturgy 18y agoEhh. Here are all of the following "shoulds" that I hear: - Your app should work at any resolution - Your app should work on any browser - Your app should work on any platform, even grandma's old PII running Windows 98 - Your app should work on dialup, and be sexy for broadband - Your app should be accessible to the blind - Your app should not break when new browser versions are released ...and so on and so forth. I am perfectly willing to write such a beast. Are you perfectly willing to pay for the hundreds of hours it would take to do it? Every app designer is unfortunately forced to make some tradeoffs. In some cases, they make many tradeoffs, usually because nobody's willing to pay them to meet the needs of every user out there. Not coding for 800x600 in these days of high resolution, high-bandwidth design, is a logical tradeoff.
- edw519 18y agoNot coding for 800x600 in these days of high resolution, high-bandwidth design, is a logical tradeoff. For whom? You? Or your client/employer? There are millions of people, credit card in hand, who will just click somewhere else if they have too much trouble with your page. My clients don't want to leave a single penny on the table. They're the ones who determine the tradeoff, not me.
- boucher 18y agoFor what it's worth, in this completely unscientific survey, much less than 1% of all visitors to my site use 800x600. There are 15 more popular resolutions ahead of it. In fact, twice as many people show up on a mobile device with 396x320 resolution (aka iPhone).
- axod 18y agoor you could just use tables, which are compatible with more browsers, and do something more useful with the time you save.
- apathy 18y agohave fun styling those tables for your clients without images
- axod 18y agoYou can apply all the standard styles to tables you do realise. Look at the css, and it's just all a bit ugly with the work arounds for browsers.. A little hacky. Also what if you want 4 columns? or maybe you want one of them a fixed width... Sure, with the next version of css, tables will be eaiser to do with just css, but now it still seems like a hack to me.
- mrkurt 18y agoTables would make that not work so well on, say, an iPhone. The way it currently works, the "content" column is going to be the first thing visible when the browser's not wide enough to fit all three.
- wvenable 18y agoTables render better on mobile browser than pure CSS layouts. Mobile browsers are very smart about tables and almost always do the right thing. CSS is just too complex to get a good result when you need to scale down to a small screen.
- boucher 18y agoMobile Safari handles CSS based layouts just fine.
- mrkurt 18y ago...sometimes. When you put three cells next to each other in a table, you're telling the user agent "this is a row of related data". It's difficult to intelligently choose how to lay those out if there's not space for them to appear side by side. That CSS layout leaves a bit more up to the user agent. The primary content appears first, if there's not space to position each column next to the primary content, it drops down below.
- sanj 18y agoEveryone appears to want CSS to do this. It seems to be hard. Does it strike anyone else that this is a failing of CSS as a technology?
- aston 18y agoIt's not so much as failing of CSS as a technology as it is an indication that CSS is not the language designers want it to be. What really sucks is that it's actually pretty close to that language. Everything's fine until you hit the cross-browser compability issues or realize it's missing a few primitives (like the ability to easily create columns). Then you want to tear your hair out. And/or resort to hacks.
- mrkurt 18y agoI dunno, CSS doesn't really provide much to help you scale a layout. Scaling using percentage widths is about as rudimentary as it gets.
- Hexstream 18y agoWhat about ems?
- mrkurt 18y agoWhen I say "percentage based scaling", I mean "simply resizing elements to fill the screen". That's what's rudimentary. A nice scaling toolkit would let you intelligently use all that width. You might be able to change how things flow, change how much content shows in various elements, etc, etc. Making wider columns usually sucks.
- thaumaturgy 18y agoExactly. I think CSS started out as more of a typesetting layout, and has been stretched into this other beast. To me, it doesn't make much sense to spend many hours of cursing and headaches trying to force CSS to do something that a very basic HTML table can do in just a few seconds.
- lanceusa 18y agoGreat work...I'll bookmark for future reference!
- IsaacSchlueter 18y agoHow is it we're still talking about this? This is a solved problem, and has been for the last 5 years or so. It's not a "Holy Grail" any more.
- babul 18y agohear hear.
- Hexstream 18y agoWhat does your comment accomplish that an upmod wouldn't have?
- babul 18y agoDid not want to be anonymous in agreement, but felt strongly enough that I wanted to comment and yet did not have time when commenting to go into reasoning (only had a few moments before I had to go elsewhere). Hence, the basic agreement. Was going to elaborate more later (i.e. now) but now don’t think it’s needed as points have been made by others since. ...also, in the same vein one can ask what your comment accomplishes that a downmod would't have? :)
- Hexstream 18y agoI'd feel uneasy agreeing with your motives. It'd be a mess if not only a lot of people left purely opiniative (?) comments because they don't have time to elaborate but this was also generally deemed good behavior. If you were about to post insightful commentary later couldn't it wait (in fact it did wait since your in-the-meantime comment was clearly no substitute)? Especially since others have expressed what you would have. "...also, in the same vein one can ask what your comment accomplishes that a downmod would't have? :)" I find it surprising that you'd ask that just after clarifying your motives. Would you have posted that answer if I had just downmodded you?...
- babul 18y ago
- babul 18y agoI like liquid layouts as I like things that make good use of the real estate they have. Liquid layouts also tend to print more correctly i.e. without bits chopped-off or missing.
- sah 18y agoIsn't this easy to do with tables?
- elai 18y agoWhy don't we just rename the table tag "grid" and just be honest about what it is. That way, it can either be a layout grid, or a tabular data grid.