3 Replies Latest reply on Apr 13, 2011 1:47 PM by John Waller

    Specifying a background image for a table cell

    theluck

      Did something change in CS4 when specifying an image background for a table cell? I select the cell in which I'd like to specify a background image, but, in my properties window I see only the Bg (upper) field specifying color. The Bg (lower) field is missing. Does any one know where it went?

        • 1. Re: Specifying a background image for a table cell
          Nancy OShea Adobe Community Professional & MVP

          Use CSS now. Give the table cell a class ID, and create a CSS rule for it.  In the following example, my CSS rule will  add the table_bg.gif to any table cell with a class id of "foo."  Change foo to whatever you wish.

           

           

          CSS:


          .foo {background: url(/images/table_bg.gif) no-repeat; }

           

           

          HTML:

           

          <table>

          <tr>

          <td class="foo">Table cell with a background image</td>

          </tr>

          </table>

           

          .

          Nancy O.
          Alt-Web Design & Publishing
          Web | Graphics | Print | Media  Specialists
          http://alt-web.com/
          http://twitter.com/altweb
          http://alt-web.blogspot.com

          • 2. Re: Specifying a background image for a table cell
            judyp2724

            Thank you for posting that work-around. Very helpful

             

            The previous post's question still stands -- why is the BG image field no longer in the property window? Adding background images from the property inspector was much faster than editing the css.

            • 3. Re: Specifying a background image for a table cell
              John Waller Adobe Community Professional & MVP

              The previous method used deprecated HTML inline coding technques.

               

              In the last few years, the web has moved on to separate HTML (for page structure only - as HTML was always designed to be) from CSS (for all formatting, page layout, images etc). The tools in Dreamweaver have changed accordingly.

               

              In isolation, this one issue may seem like extra work but it's really just a slightly different workflow to get the same result.

               

              If you harness the full power of CSS in your pages, you'll find CSS formatting sitewide much more powerful and flexible in the long run than HTML formatting ever could be.

               

              Makes maintenance down the track much easier too. If you want to update a background image in many table cells on many pages, using CSS it's a single change to a single tiny CSS file then upload that file. Using HTML inline formatting code, it had to be changed in every single cell in every single page then all affected pages uploaded.