Filed Under: Tutorials
A common way of designing these bars is using using nested tables and spacer gifs, which are undesirable because they prohibit vertical expansion. If you want to increase the text size or update the bar with more content, the layout becomes broken. Designing with tables and spacer gifs you end up with nonessential graphics, a fixed height, and code bloat on top of less flexibility.
A more Bulletproof approach is to not use tables at all, but to use divs. To start well need to parts, an unordered list and a div wrapped around a paragraph. I won’t bore you with code, and there is plenty of it in the book, but what makes using divs instead of tables far superior is the fact that you separate your presentation from your content and that it can expand with no extra effort on your end.
I don’t have any rows like this on my site to show as examples, but maybe I should add one to the redesign. Two great techniques that I took from this chapter are using opposing floats to put content on either end of a row and the use of style hooks. Using id’s to attach style to unordered lists and divs. Very clever stuff.
If you have any questions feel free to leave a comment. Otherwise I’ll see you next Tuesday with Chapter 4.