Forum Moderators: not2easy

Message Too Old, No Replies

background image in Firefox

         

Jose52

6:43 am on Dec 11, 2005 (gmt 0)

10+ Year Member



How can you make a background image show in Firefox using a css class? If I have a background attribute in a td tag, I can make it work, but not if I code it with a class. IE picks up either

coopersita

6:27 pm on Dec 11, 2005 (gmt 0)

10+ Year Member



It should work in firefox as well with a class. It'd be usefull if you pasted your code here.

It could be that you have an error in your code, or that your image is not saved for web.

A simple test is to try to open the image directly in the browser (drag and drop or open file). If the image opens right, then it's your css. If the browser gives you an error, then you need to resave your image (make sure it has a resolution of 72 ppi).

Mobull

7:29 pm on Dec 11, 2005 (gmt 0)

10+ Year Member



Just plain and simple. It should work like this:

<style>
.tdtest{
background: url('picture.jpg');
width: 200px;
}
</style>
<body>
<table>
<tr>
<td class="tdtest">content here</td>
</tr>
</table>
</body>

Make sure that you mentioned the td's width or that there is content in the td, otherwise it won't show.

Jose52

2:40 am on Dec 12, 2005 (gmt 0)

10+ Year Member



Thank you so much, Mobull. It was the lack of designating the width in the css. Apparently IE didn't need it, but Firefox does. Once again, thanks for the help and quick reply!