Sunday, March 28, 2010

Background image in table...help!

Hey guys, i'm new to using dreamweaver CS4 and have a question about putting a background image inside a table's cell. I found the following info

To add a background image to a table, table column, or table cell:

1In the Document window, select the table element to which you want to add a background image.
2In the Property inspector's BG field, select the folder icon, then navigate to the image you want to use as the background image.

taken from: http://www.adobe.com/support/dreamweaver/layout/bg_image_in_table/bg_image_in_ta ble03.html

However, I cannot find the folder icon in the property inspector's BG field. Please see my screenshot in order to get an idea of what i see on my dreamweaver CS4 when trying to do this.

Can anyone point me in the right direction?

Background image in table...help!

Table background images should be done by CSS now. The old property field approach is now deprecated (because the HTML attribute it is based on is deprecated in todays web standards).

So give your particular table cell a class and use CSS to give it a background image.Example:

HTML: %26lt;table%26gt;

%26lt;tr%26gt;

?%26lt;td class=''backgroundImage''%26gt;

My beautiful cell.

?%26lt;/td%26gt;

%26lt;/tr%26gt;

?%26lt;/table%26gt;

CSS:

.backgroundImage{

background: #ccc url(../path/to/your/image.jpg) repeat;

}

And now your cell will have a nice background image (or color or both) and it's standards compliant. Yeah!

If you *do* want to use the old approach (but I don't recommend it) you'll need to use code view and insert it by hand.

Go into code view and find the cell you want to have a background image. Then after the ''d'' of %26lt;td%26gt; , put a space and then type ''background:'' (or bgcolor if you just want to color it). Dreamweaver should start to autocomplete this (unless you've turned it off). Then point to your image or select a color. But remember that this is the old, deprecated method.

No comments:

Post a Comment