Skip to main content
Inspiring
February 20, 2008
Question

Simple HTML on a cfmm file question. Please help

  • February 20, 2008
  • 1 reply
  • 292 views
Hello;
I am having a problem in a site I am making with a bg image not acting properly in other browsers. It looks great in IE, but in firefox, opera and netscape, it drops to a repeat of the BG in the cell. I am stumped! I have tried everything, is there a code in my table I need to tweek to get it to stop it's reaction?

Here is my table code:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="40%" align="left" valign="top"><img src="img/home_01.gif" width="389" height="125"></td>

<!--- these are the tables dropping to another repeate of the BG --->
<td width="1%" align="left" valign="top" nowrap="nowrap" background="img/home_02.gif" bgcolor="#FFFFFF"><img src="img/home_02A.gif" width="8" height="125"></td>
<td width="49%" align="left" valign="top" nowrap="nowrap" background="img/home_02.gif" bgcolor="#FFFFFF"> </td>
<!--- end trouble code --->

<td width="10%" align="right" valign="top"><img src="img/home_03.gif" width="101" height="125"></td>
</tr>
</table>

Sorry to put such a trivial question up, but I am going to be streaming cf info over it, but I can't stop this dropping happening in other browsers.

Thanks for the help

Phoenix
    This topic has been closed for replies.

    1 reply

    February 20, 2008
    Well firstly, this is not a CF related question - just because it's going to be a CFM page it does not represent an issue with CF directly.

    I did have a look at it though and it seems to look consistent between Firefox and IE6 - both repeat the image (if that's actually the problem you detailed).

    Using background="" on a table is very old skool and is not very useful - besides that, I think it's not even a standard. I only ever use this attribute when creating email shots - not websites.

    I would recommend using CSS to do this kind of work. With CSS you can do something like.

    HTML
    <td class="myCell">Blah</td>

    CSS
    .myCell { background: #fff url("/img/home_03.gif") 0 0 no-repeat; }

    With CSS it's much easier because then you just give whatever you want that style to apply to the same class and if it ever needs changing you do it in one place.

    Good luck - but please keep it relevant next time!