Learning is Doing is Learning
Approaches to Layout on the Web
My name is Inigo Montoya... er... actually, my name is Brendan Delumpa, and I'm a professional web developer. I've devoted this site to tricks, tips and thoughts that I've either run across or developed to affect different web layout techniques. And while you might find that many of the techniques here are pretty neat, to make it on this site, they have to follow specific rules:
- The technique must be semantic validate to strict compliance.
That is, we're using things the way they were meant to be used according to the W3C. For instance, techniques involving tables used for anything but tabular data will never make it here. - I observe standards as much as I can... I'll admit that I don't have full knowledge of every single detail of what I can or can't do in HTML, but I've got a lot of knowledge, and I apply what I know to my code, so the code you see here adheres to standards as closely as possible.
- No CSS hacks allowed – kind of...
One of things that I have strived to adopt in my web development is that I will code my HTML according to strict standards and utilize proper CSS and/or JavaScript with no browser hacks. That said, at some point, hacks are inevitable due to the differences between browsers and how they render CSS. In spite of that though, the furthest I try to go along these lines is using the !important directive, which will validate. But let's face it: If a hack will get your project completed, don't lose sleep over using one. The point is to use CSS hacks as an exception, not a rule.Along these same lines, in order to achieve as close to hack-less CSS, you have to make some compromises in what you do with design. That may or may not be optimal for many people, and I understand that because presentation is a site's "sizzle." Semantic layout truly is a balancing act...
- Browser Level 5+ - BUT we degrade nicely
The days of having to support 4.x browsers are over. People, if you're still using an old browser, please get an updated version now. But because we're doing semantic layout here with strict adherence to standards, the techniques here will degrade nicely for crippled browsers. - No technique shall be a one-off
Like most, I love neat and stupid tricks. But I wanted to share techniques here that are applicable for everyday use.
Why did I build this site?
I built this site for a number of reasons, and no, it was never meant to be a "help" site, though ultimately it becomes one by virtue of the content. But probably the most important reason for building this site was for it to act as a repository for things I've come up with that I don't want to forget.
Why bother with standards anyway?
Especially in a team development environment, in the absence of a coding style guide (which will create a mutiny among your developers), adhering to standards levels the playing field. I realize that everyone has their own particular style, but if you're adhering to standards, most people will do things the same way. So you want to get better control of your codebase? Stick to the standards.
