Saturday, March 3, 2007

Background Colors

You can add background colors behind the elements in your custom text fields. With a simple CSS code, you can make colorful background blocks for your text or photos that look like this:



To create a color block, just determine the color you'd like to use either by name or by using a graphics program or hex conversion chart like the one found here:
http://www.december.com/html/spec/colorcodes.html


Replace the color code in the example code below with your own hex code, then paste the code in your custom text area right before the element that you'd like to have a background.

<div style="background-color: #DBD0E6;">

Use this code to close the tag and end your special background: </div>

The photo border shown above was created using this code:

<div style="background-color: #DBD0E6;"><img class="photoalbum" src="http://www.babysfirstsite.com/members_images/brandon/Bailey/IMG_4455_large.jpg" width="400"></div>

No comments: