Image not visible in Firefox

K

kronrn

Hi

I wonder if anyone could help me. This html doesn't show the image (the
background-image) in the second column in Firefox.

<table border="0" cellpadding="0" cellspacing="0" style="height: 70px">
<tr>
<td valign="top" colspan="2"><img id="ctl00_Header1_imgLogo"
src="images/Logo1.jpg" style="border-width:0px;" /></td>
<td width="100%"
style="background-image:url(images/bg1.jpg);">&nbsp</td></tr>
</table>

If anyone has any pointers I'd appreciate your input.

many thanks

Ron
 
E

Els

Hi

I wonder if anyone could help me. This html doesn't show the image (the
background-image) in the second column in Firefox.

<table border="0" cellpadding="0" cellspacing="0" style="height: 70px">
<tr>
<td valign="top" colspan="2"><img id="ctl00_Header1_imgLogo"
src="images/Logo1.jpg" style="border-width:0px;" /></td>
<td width="100%"
style="background-image:url(images/bg1.jpg);">&nbsp</td></tr>
</table>

If anyone has any pointers I'd appreciate your input.

First, set a background-color, to check if it is a problem with the
image, or with your code. If the background-color works, go on to
check if the url to the image actually points to the image, iow, did
you upload that image with that name to that place?

Other than that - please provide a url to a (non-)working example :)
 
J

Jukka K. Korpela

I wonder if anyone could help me. This html doesn't show the image
(the background-image) in the second column in Firefox.

<table border="0" cellpadding="0" cellspacing="0" style="height:
70px"> <tr>
<td valign="top" colspan="2"><img id="ctl00_Header1_imgLogo"
src="images/Logo1.jpg" style="border-width:0px;" /></td>
<td width="100%"
style="background-image:url(images/bg1.jpg);">&nbsp</td></tr>
</table>

.... you should probably start from fixing the markup. Why are you using such
bulky presentational trickery if you are using CSS anyway? And invalid
markup at that. Is this logically the main heading? Use <h1> then, and style
it. Or is it just a logo bar that appears at the start of every page? Using
<div class="logo"><img alt="...." src="..." ...></div> with a little bit of
CSS should suffice then. There's hardly any need to use a layout table here.
 
K

kronrn

Els said:
First, set a background-color, to check if it is a problem with the
image, or with your code. If the background-color works, go on to
check if the url to the image actually points to the image, iow, did
you upload that image with that name to that place?

Other than that - please provide a url to a (non-)working example :)

Thanks for the quick response Els, very much appreciated :)

I tried the things you suggested without success. setting the
background color worked, the image was in the right place.

Strange thing though, it now appears to be working!

Not sure what I did because the markup is the same, perhaps I didn't
copy everything to the server, that particular image anyway.

The site is only on my development server at the moment so I'm uable to
post a url just now.

Thanks again for your help on this.

Ron
 
K

kronrn

Jukka said:
... you should probably start from fixing the markup. Why are you using such
bulky presentational trickery if you are using CSS anyway? And invalid
markup at that. Is this logically the main heading? Use <h1> then, and style
it. Or is it just a logo bar that appears at the start of every page? Using
<div class="logo"><img alt="...." src="..." ...></div> with a little bit of
CSS should suffice then. There's hardly any need to use a layout table here.

Hi Jukka, thanks for getting back to me so quickly :)

I'm afraid I'm not really very good with html and css, there are a
great many gaps in my knowledge and I'm experimenting at the moment,
trying to learn more.

It is as you say just a logo bar with an image to the right to pad out
to the right side of the page. As I said to Els though it appears to be
working now. I will look into your suggestion for a better approach
with <div> etc.

Thanks for your help Jukka

Ron

P.S. removing colspan=2 from the first <td> seemed to help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top