Why It's BulletproofAfter simplifying the markup and making creative use of small background images, we've successfully rebuilt the rows using bulletproof methods. Let's talk about why. SEPARATION OF STRUCTURE AND DESIGNWe tossed out the tables and nonessential graphics and replaced th76 with lean, structured XHTML. The meaningful markup stands a better chance of being understood properly by a wider range of devices and softwareeven in the absence of CSS.Instead of coding the images that make up the design of the rows right in the markup, we moved them over to the style sheet instead. Making changes to this design later on down the road will be significantly easier, not to mention that the amount of code has been drastically reduced.For example, going from two shades of green to red, blue, or any other color would be as simple as changing a few CSS rules. Instant design results. NO MORE FIXED HEIGHTSRather than assuming these rows will always be x number of pixels tall, we creatively positioned background images, preserving the integrity of the design while allowing it to expand and contract as needed. This approach also allows us to freely use font-sizing methods (such as the one described in Chapter 1) without relying on a pixel dimension for the text contained within.Figure 3.19 shows our reconstructed rows, now with a much larger text size applied to the content. Notice how the rounded corners and background of the design stay intact. Figure 3.19. With an increase in text size, the rows expand while the design is unhindered.[View full size image] ![]() Figure 3.20. Adding a second line to the #message row means zero work for the designer, since we built an unlimited amount of room into the design. Foam hammer?![]() |