Tip: Adding borders to elements
October 24th, 2007 | Published in Google Desktop API
Empty divs with a background color are a great way to add borders and shadows to GD elements. As an example, consider the edit box, which normally has a white background and no border. Add a colored div that's just slightly larger than the edit box, place it under the edit box, and you have a border.
|
|
|
The possibilities are truly endless. You can even manipulate the colors of more complex border designs to make an element look embossed, beveled, or extruded, as shown to the right. But don't go too crazy; for a complex design, it probably makes sense to use an img element instead of ten divs.
For more information on using divs, see Tip: Use divs to organize your gadget elements.
Have a tip you'd like to share? Send it to gd-developer AT google DOT com.