9 ms·
For those interested in the final gradient technique, it looks like they're just using a div with a background color of #f9f9f9 and a bottom border of #eee, the
by aston 18y ago
For those interested in the final gradient technique, it looks like they're just using a div with a background color of #f9f9f9 and a bottom border of #eee, then sticking it (absolutely positioned) at the top of the box that also contains the text div for the button.
Not sure why he was trying use <b> rather than a <div> or why he stuck it on the bottom instead of hanging it from the top, but the latter approach intuitively seems like it would work cross-browser.
- ivey 18y agoHe was using <b> instead of <div> because it was shorter. That's a 4 byte savings on each button. If you had a lot of buttons on a page...that could end up saving hundreds of bytes. I'm not sure how much that matters in the long run, but it's a great attitude to have. Bytes matter, microseconds count. I started this comment purely tongue-in-cheek, but convinced myself of the argument before I finished writing it.