Becoming A Tableless Guru
This morning I received an email from someone who reads my blog. He asked, “Can you send me some links to help me become a tableless design guru? My group uses nested tables everywhere and I want to be the catalyst for change but … I am not up to par yet.” I have had some form of this question posed to me numerous times and, I’ll admit, I’ve been rather derelict in responding. So if you are one of my readers who have in the past asked me for links, books, or other recommendations on how to master CSS then please forgive my non-response. I applaud you for wanting to move forward and for your thirst for knowledge. I really do apologize if my lack of response presented you in any way with a little speed bump on your road to Web Standards.
The reason that I haven’t responded in the past is that, quite frankly, I felt overwhelmed … because I really didn’t know where to start. Sure, there are some pretty good books out there, and sure, there is quite a long lists of blogs that I try to visit regularly – and I will tell you what these are in a moment – but the truth is, at least for me, I had to pretty much eat, sleep, and breath CSS for a while before I even began to feel like I sorta kinda knew what I was doing.
So, how exactly do you eat, breath, and sleep CSS? Well, I can only tell you what I did …
First, Read Relatively Absolute
Relatively Absolute is the article that made a light bulb go off in my head and I thought, “Oh! I finally get CSS positioning! Wow … it actually wasn’t that mysterious after all.” Really, it changed my coding life. All kinds of possibilities opened up for me after reading it.
Read Some Books
There are good books out there, and more and more are being written. I’ll admit, though, that the only two I’ve read personally are:
Both are excellent. Buy them immediately. ;o) Others that I would probably read (or would have read when I was just starting out) if I had the time are:
- CSS Mastery
- Bulletproof Web Design
- Eric Meyers on CSS and More Eric Meyers on CSS
- Designing with Web Standards
- HTML Utopia: Designing Without Tables Using CSS, 2nd Edition
Even Better … Read Some Blogs
I haven’t read too many books on CSS, but I do read a lot of blogs. When I was starting out I read them constantly. Reading CSS articles and blogs was what I did at night for fun. Here are a list of some of my favorites. I have always been loathe to post them because they are mostly the same ones that everyone posts and I feel annoyed sometimes by the “celebrity” that these blogs enjoy. It irritates me because I may post a really in-depth tutorial and get 3 comments, but one of these “A-listers” posts about the pastrami sandwich he ate for lunch and he gets 50 comments. Grrr. But, I digress … this is what I read:
- 456 Berea Street
- A List Apart
- Andy Budd::Blogography
- Authentic Boredom
- Dave Shea’s mezzoblue
- Jason Santa Maria
- SimpleBits
- Site Point
- Stopdesign
- Veerle’s Blog
- What Do I Know
- Wisdump
- Vitamin
That should be enough to get you started.
Now Just Do It … Commit To Leaving Tables For Layout Behind
I don’t know about you, but the only way that I really learn anything is by doing it. So just do it – make that commitment and stick with it. Easier said than done? Yes and no. Say you want to have a two-column layout with header and footer, a few floated images, maybe a pull-quote and such. Go and find a nice example of this structure done in CSS – the simpler the better. There are tons of resources for CSS layouts, and I don’t have the time to hunt them all down – but you can. Look under the hood at the XHTML and CSS and see how scary it looks (view the source to see the XHTML, and follow the link to the CSS file in the head to get your hands on the CSS). I know you can find one that’s not too frightening. Now, copy the structure (of course, don’t copy graphics or content or any of that stuff) and try to replicate a simple version on your computer. Once you have that working, you can start experimenting with embellishing.
Learn To Be A Champion Debugger
If there is one skill that will help you beyond all others it is this. Learning a few simple debugging tricks can save you loads of time, not to mention sanity. Here are some of my favorites:
- Validate: validate both your XHTML and CSS. Often problems lie with malformed code and can be relatively easily identified.
- Borders: “border:1px solid red” is my favorite. Put this around elements you are having a hard time with to see what is contained or not contained within it. Putting borders of various colors on all the elements that are interacting and not doing what you want can be immensely helpful.
- Background Colors: “background:red” is another favorite of mine. Backgrounds work much the same as borders, but sometimes one is better than the other … or a conjunction of the two.
- Narrow down the problem. Sometimes you are working forever tweaking your code, and you are tweaking the wrong code. Comment out 1/2 your style sheet. Is the problem still there? Then you know which 1/2 contains the problem. Comment out 1/2 of the remaining styles. Still got that problem? Continue doing this until you find exactly the code causing the problem. Now start tweaking.
- !Important: If an element isn’t taking a new style (color:green for example), add an !important declaration and retest. (Of course, use Firefox rather than IE for this, as IE doesn’t recognize the !important declaration). If your text is now green you know the problem is that you haven’t been specific enough. You may have said “#maincol p {color:green}” but somewhere else it says “#container #maincol p {color:blue}” … it is more specific. Either add that #container from the one that lacks it or take it away from the one that has it. Then remember to remove the !important … in most cases, it should only be used for testing specificity.
- Reset the global margin and padding for all elements to zero. (* {margin:0; padding:0}) … many times, it is the difference between default margin and padding values amongst browsers that causes maddening inconsistencies. If you reset all of these values to zero then you control them, instead of the browsers, when you set them.
Ask For Help
Ok, you’re trying, but you can’t get something to work (or, more likely, you just can’t get it to work in IE), something crazy is happening when you try to float things, page elements won’t obey your stylings, or a myriad other mind-numbing problems are occurring. Don’t spend a day maniacally fiddling with the CSS and banging your head on your desk or crying. Instead, do this for about 2 hours (it is important to try – you’ll learn a lot this way), but then go ahead and ask for help. When I first started, the Web Standards Group and, to a lesser degree, CSS-Discuss were my best friends. Those places can be like miracles for the struggling Standardista. You post your mind-numbing problem (make sure to be clear and post links if you have them) and inevitably some guru will come along and out of the kindness of her heart she’ll lay some amazing knowledge on you that makes you feel like a peon, but you’ll be so grateful. You’re going to have to do this a lot while learning. I did.
Accumulate Tricks
When you’re just starting out, you don’t have a lot of tricks up your sleeve. Don’t worry, in the frustrating months to come you will accumulate a lot of them. The first time you encounter a browser bug it can make you nuts, but after some head banging, some research, and some help you discover that your bug has a name, and that there’s a way to address it. File this information away – if you don’t have the best memory for these things then start a list. Next time you encounter this bug you say, “Aha! I know you! You’re the double float margin bug (or whatever) and I know just what to do about you!” Once a client called me in desperation, his team had been pulling their hair out because none of the links on their pages were working in IE. They couldn’t imagine what had caused this and had tried every form of debugging they knew how to do. They were at their wits’ end. I immediately asked, “Are you using a transparent png as a repeating background? If so, is it taller than 1 pixel?” My client was excited … yes, they were using a 20 pixel high repeating shadow background. I told him to cut it down to 1 pixel high – that would do the trick. And, of course, it did. He was thrilled and called me a “CSS Maven” (which thrilled me to no end). But all I had really done was remember the solution I had finally found to the same exact problem when I had had it a few months ago. Being an “expert” is really just accumulating experience and drawing upon that experience.
Getting Over The Hump
Converting from deeply ingrained old-school habits to Web Standards isn’t easy. I’ll be honest with you, there’s a steep learning curve. The good news, however, is that there are more resources available to you now then ever before. One day you’ll find out that you are over the hump. I woke up one morning and realized that I hadn’t been on the discussion boards asking for help for about two months. I realized that in most cases, when a problem came up, I knew what to do. That was a nice morning.
Finally – Give Back A Little
Remember all those awesome folks who helped you out along the way? Without whom you would have missed a deadline, disappointed a client, or perhaps hurt yourself in your frustration? You can be one of them now. Go ahead and troll the discussion boards that helped you so much once in a while and offer some relief to someone struggling with that bug that you know so intimately now. You’ll feel good about yourself, believe me.
If you really enjoy sharing then start a blog! One thing that has really, really helped me refine some of my processes is writing about them. When you write to teach others, you reflect in a way that you don’t, or often can’t because of time restraints, when you are coming up with these processes in the first place. I am almost always able to simplify and refine my code when I blog about it.
Best of luck to you all … see ya on the discussion boards. ;o)
August 2nd, 2006 at 1:22 pm
Just great, Mani. This is exactly what I’ve been (gently) prodding you to write. This is really helpful stuff. And it’s encouraging to think of you starting off, struggling, getting over the hump, and becoming a “CSS Maven.”
It’s nice to remember that experts don’t start off that way. I love how humble you are in sharing your experiences with us. Thank you!
August 2nd, 2006 at 1:29 pm
Mani,
You are the best! Like I said when we first talked, I feel almost like I am talking to a rock star, because in the design/css world, you are like a rock star! I waited for a link or two and instead you wrote a great list for all to use. I will agree as a “list helper” in java, .net, and database design that we all should remember to give back to the places that help us. Thanks again for this great list of helpful sites, blogs, and books.
Travis
August 2nd, 2006 at 2:35 pm
Thank You for sharing your wealth of experience and information. I for one, am grateful that you enjoy sharing.
Thanks,
Jeff
- from the starting line of my tableless layout journey
August 2nd, 2006 at 6:47 pm
Tableless Guru … and a great advertisement for beautiful design using standards. :)
My first reaction was “What? People still design with tables — which century do they live in?” Sadly, it’s true. Thanks for helping improve the web.
BTW — I find the CSS-discuss Wiki a good place to find solutions.
Cordially, David
August 3rd, 2006 at 3:59 am
Thank you for this article. Your tips (such as the borders) I can tell are going to be invaluble to me very soon.
Also, taking your advice of reading CSS and decided to read yours. I had to laugh at the comment at the top:
“Description: The default WordPress theme based on the not-so-famous Sheriar Designs.”
I’ve never actually commented on your site before (I don’t think..) but I watch your RSS feeds religiously and you’ve taught me a hell of a lot. I thought I’d tell you after you said how little comments you get. I’m willing to bet there’s a lot more people like me who you never hear about but who you’ve taught so much.
(Cue restraining order? :\)
August 3rd, 2006 at 10:51 am
YEAH!
I was one of those people who asked for this, and as always you have delivered way above what I expected.
I would also like to chime in a tell you how much I have learned from your blog as well. I can say without a doubt that you have pushed me to a MUCH better understanding of CSS than before I found you blog (Thanks csszengarden!)
As a student, I have only known about the world of web design for the last two years, so I did not really have to deal with changing over from table design. I got to start with CSS! I love web design, and I really hope that I can take the small opportunities that I’ve had to use my skills and build on them!
I’m so grateful for people like you! Thanks!
August 3rd, 2006 at 10:54 am
Oh, and I do have another question, which is likely a whole other discussion. But how do you get the business side of a company to understand the importance of using web standards? I’m working with one and the code is HORRIBLE, but all they want me to do is update content. I want to streamline their code, but all they see is someone taking a whole lot of time to have basically what “looks†like the wsame thing.
August 3rd, 2006 at 10:59 am
Thanks so much for all the kind words!
You guys probably don’t realize how much these comments mean to me … they really help keep me going.
I’m very appreciative of the support I get for my blogging efforts.
Rachel: I found that the best way to get businesses to care about Standards is to help them understand how it affects their bottom line. This is the only thing they tend to care about anyway (many of them, at least). There are a lot of ways to present them with this, and I smell another post on the horizon where I give you some of my favorite techniques …
August 4th, 2006 at 1:58 pm
I’m another one that reads but never comments :) But yes, I love reading your articles (even if they cover something I already knew). I use the red border all the time in debugging, but I’ll have to remember that sometimes a red background might be more useful.
August 4th, 2006 at 5:57 pm
Ha! That is so true about the A-List bloggers!! It IS so annoying!!! They really do write about their pastrami sandwiches and they really do get 50 comments saying things like, “Oh … I just had a great pastrami sandwish too!”
My theory is that everyone knows how many hits these blogs get, and they just comment to comment … in order to leave links to their own blogs at these high-profile sites. It’s just a big game.
Sigh.
Keep up the great work.
November 22nd, 2006 at 11:11 am
This article is great! Really helpful. I discovered this site pretty recently through the CSS Zen Garden site. I think I will be visiting more often. Thank you for all the advice.
May 29th, 2007 at 2:29 pm
I remember making the CSS leap from tables and while at first I found myself looking blankly at my screen more often than is healthy, it became strangely second-nature after a time. However, I found that convincing everyone around me that CSS was the way to go a bit harder than learning it to be honest. Tables are a comfort zone for some people and they can’t see how it holds them back.
My new hurdle now: Everyone who I convinced to come on over to the CSS side of the world thinks I am their encyclopedia of knowledge. Oh how I wish I had that kind of know how.
June 13th, 2007 at 12:13 pm
This article/blog has helped me tremendously with getting started on my web design journey! I’m currently a student about to graduate and I definantly want to be a software developer, but there’s a creative juice inside of me that desperately wants to be noticed and released (must be the Pisces in me)! I fiddled around with frontpage, html, and some photoshop when I was younger and got away from it. Now I definantly want to get back into the web design game…especially now that someone has asked me to do a website for them! Mind you, I’ve never done a website before so this will be a very interesting journey for me! At least now I have some knowledge and some places to go for help! Thanks a bunch! 1luv!
June 29th, 2007 at 10:30 pm
Excellent. Just starting out on the journey, have raided your site a couple of times for the wealth of information you provide, but must post now that I found this page.
I had visited several of the ‘A-list’ sites and the link to Relatively Absolute on Autistic Cuckoo is pure gold… (borders are part of width?! doh!)…
BUT the main reason i wanted to post was the sense of hope your ‘over the hill comment’ gave me… oh yes, the headbashing and perpetual forum trawling… I’m so glad I can expect to one day be over that :)
Thanks for your sublime site, much love.
January 7th, 2008 at 10:48 am
Thank you for posting the resources. I’m revisiting website design after getting stuck providing office solutions for 15 years. I have felt like I’ve missed some boat that came in and is pulling fast out of the harbor. but after spending some time on your blog I’ve gained some hope that I’ll catch up to CSS and tableless design quickly.
My approach to the CSS movement has been to forget I knew anything about web design practices of the past and start with a clean slate. You will be on my list of sites to visit often.
November 13th, 2008 at 9:57 pm
mani, you are so generous and awesome to write this amazing article for us. it addresses most of the questions i’ve been wondering about being a newcomer to the web design world. thank you so much! hope you don’t mind that i’ll probably be linking my blog to yours to share this article with others. as for me, i will read and re-read and take to heart all of your advice. thanks mani! you’re the best!
ps – btw being a newbie, i’m learning how to code forms in xhtml/css now. bit of a headache for me since i’m more of a designer than a coder, but i do have so much fun learning! for sure, i’ll be visiting your blog often. keep on writing, mani!
November 13th, 2008 at 10:39 pm
[...] only did mani write back, she gave me a link to an article she wrote in 2006 called “becoming a tableless guru.” i read it tonight and loved it. mani addresses many of the questions i have, and many i [...]