HTML Help - Table Cell Backgrounds

Discussion in 'Web Design & Coding' started by vern, May 27, 2003.

  1. vern

    vern Dominus Political User Folding Team

    Messages:
    1,571
    Location:
    Minnesota, USA
    I set a background on a table cell ... I was wondering if this was possible ...

    1. Set the background image of the cell to vertical align bottom.
    2. With the above criteria met ... will it stop from repeating?
     
  2. mhr

    mhr Guest

    Hello, using "classic" html, noway !
    Using css just add something like this in your style definition
    background-image: url(image.gif);
    background-position: bottom left;
    background-repeat: no-repeat;

    You must take on account that if you want to see all of your background image, the TD size (or TD contents size) must at least be the same than your image size

    Here is a working example , you can cut and past in an empty html file.
    PS : The images can be downloaded from this forum.
    <html>
    <head>
    <title>Mon titre</title>
    <style>
    TD.right {
    background-image: url(bottomright.gif);
    background-position: bottom right;
    background-repeat: no-repeat;
    }
    TD {
    background-image: url(bottomleft.gif);
    background-position: bottom left;
    background-repeat: no-repeat;
    }
    </style>
    </head>
    <body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <table border="1" cellpadding="0" cellspacing="0" background="infobg.gif">
    <tr>
    <td align="center" valign="middle" height=200 width=500>|</td>
    <td align="center" valign="middle" height=200 width=500 class="right">|</td>
    </tr>
    </table>
    </body>
    </html>

    Happy programming,
    Meher.
    France.
     
  3. vern

    vern Dominus Political User Folding Team

    Messages:
    1,571
    Location:
    Minnesota, USA
    Great! This is just what I needed.