Wednesday, October 24, 2007 at 8:40 AM
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.
<div x="10" y="0" width="60" height="19" background="#000000" /> |
<div x="12" y="2" width="60" height="19" background="#676767" /> |
<div x="10" y="0" width="64" height="24" background="#222222" /> |
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.
3 comments:
What a cool tip. :)
Yeah really cool thing.. :)
Thanks.
nice :) thank you very much for this tip
Post a Comment