Click to See Complete Forum and Search --> : image


tiger66
07-28-2003, 09:36 AM
Hi
I am trying to add an image with css
I tried the following

.logo
{
background: url("logo.gif");
height: 80px;
width: 80px;
border: 0px;
}

<td class="logo"></td>
but I don't see my images. Why???

Please help

Thanks

nkaisare
07-28-2003, 10:21 AM
Any reason for using the code you have? There are several reasons for this question:
1. Accessibility: The image-replacement idea is used to make web pages accessible. For example, if you have a decorative text, you hide the text and use the background properties to add the image.
2. It seems to me that you are using the tables for layout, which is improper. Tables should be used for tabular data.
3. Is there any reason why you dont want to use <img src="logo.gif" alt="">? I see none in this example.

Coming to your question: are you using correct path to your image? The path is relative to the place where the style definition is placed (i.e. if its external CSS, path is relative to the CSS file). The filenames are CaSe SeNsItIvE.