PDA

View Full Version : Please Help!!


shoredogg
02-22-2007, 09:36 AM
Please help me!

Im having an often reccuring problem with Dreamweaver. I'v created a table with two rows, in the top half i have an image and it the bottom half i'v got a background image.

When i view the document through internet explorer the background picture disappears and you can just see the image in the top cell. When i first created the table i kept viewing it and it was fine but then i changed the size of the table and the background image disappears. I'v been trying to solve the problem for hours i started from scratch and the same thing happend again. This is the html code see for yourselves


<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-image: url();
}
-->
</style></head>
<body>
<table width="980" height="580" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><table width="723" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><div align="right"><img src="/Images/main_tab%20copy.gif" width="600" height="28"></div></td>
</tr>
<tr background="/Images/main_body copy2.gif">
<td height="137">&nbsp;</td>
</tr>
</table>
<div align="center"></div></td>
</tr>
</table>
</body>
</html>

I would really appreciate any help

davidj
02-22-2007, 10:04 AM
where you have ...

background-image: url();

You are are not declaring an image ! It needs to be...

background-image: url(image.jpg);

also you have this...


main_body copy2.gif

and this

main_tab%20copy.gif


Bad practice naming images with spaces. Remove the Spaces and rename the images accordingly

shoredogg
02-22-2007, 05:43 PM
hello no sorry i didnt mean my page background i ment the background image in a cell the bottom cell of the table. I have renamed it to body.gif and it worked for a while but then i changed the filename to main_body.gif then it stopped working again so i changed it back once more to body.gif but now its not working again?

davidj
02-22-2007, 06:04 PM
you have not uploaded the page. When you changed the name of the image then the page could not find as it was called something else

davidj
02-22-2007, 06:08 PM
where you have...

tab%20copy.gif

this image name has been urlencoded. The code is looking for the image above but that does not exist. The %20 is urlencode for a space.

shoredogg
02-22-2007, 06:19 PM
I dont think that is the problem as i have renamed the image to body.gif and it is still doing it. I'v now uploaded it to my website check it out below the tab image there should be a background image of a table but it is not there?

the website is

www.evolutionleagues.co.uk (http://www.evolutionleagues.co.uk)

if you upload it into dreamwevaer you will see it is a big table and there is a background image defined in a cell but it doesn't show?

shoredogg
02-22-2007, 06:24 PM
Please also visit this web site to see what it should look like

http://www.evolutionleagues.co.uk/index.htm

davidj
02-22-2007, 07:51 PM
you have this in one example...

<td align="center" valign="middle" background="/Images/main.jpg">

but you dont have this in the other example

davidj
02-22-2007, 07:54 PM
you need to learn HTML because your going to run into trouble like this

shoredogg
02-22-2007, 08:02 PM
yeah i added that just to show an example of what it should look like just ignore that page.

The problem is on the othe page the <tr background="/Images/body.gif"> is in the code but it is not actually showing the image body.gif??

davidj
02-22-2007, 08:11 PM
remove the / from the begining of the /image/main.jpg

so it looks like this...

background="Images/main.jpg">

shoredogg
02-22-2007, 08:48 PM
the problem is not my html the code is in there it should be desplayed but it is not showing

chriskq
02-22-2007, 09:14 PM
first of all. YOU have NO DOC type set. This is the first and foremost bit of code a browser reads to determine how your html file is rendered.

i see your main.jpg image in firefox but not in IE. Why? - because your not listening to what other members are saying.

you have not removed the "/" before images. This is where your image exists in your ftp structure
http://www.evolutionleagues.co.uk/images/main.jpg

there is no need for the first forward slash.

please re-code that td cell to be like this:

<td style="background: url(images/main.jpg) no-repeat 0 0;"></td>


were here to help but u have to listen.

shoredogg
02-23-2007, 11:00 AM
I am listening that is the problem nobody is listening to me. I know that it is bad to put a space between image names e.g. main body.gif because dreamweaver will put a % between like main%body.gif.
That is bery basic advice but im rushing the website as an example to show you the problem. And the solution you gave me take out the \ before the images thats the wrong website that was an example to show you what i want it to look like that site is working fine.

the problem is on

www.evolutionleagues.co.uk (http://www.evolutionleagues.co.uk)

when you load the page all you can see is a image saying home about us etc well there should be another image just below it an image of a table.If you look at the code that says:

<tr background="/Images/body.gif">

thats the code that is not displaying, i know there is scrappy html in there because i just rushed the site to show you my problem and trust me i'v cleaned up the html but it still doesn't show the image and i'v take out the / but it still doesn't work.

Try it yourself copy the code below, paste it into dreamweaver. Youll see a table with two rows. In the top row put a picture of your own choice, then in the bottom put a background image. Now preview it in browser youll find you can see the top row picture but not the bottom row background image.

This is what im struggling with there are other ways round it but it is really bothering me why it doesn't show the background picture it seems like something really simple but i just need to know a solution incase i run into this problem again.

I'd appreciate any help



<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
background-image: url();
}
-->
</style></head>
<body>
<table width="980" height="580" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle"><table width="756" height="490" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="726" height="28" align="right"><img src="/Images/main_tab%20copy.gif" width="600" height="28"></td>
<td width="30">&nbsp;</td>
</tr>
<tr background="/Images/body.gif">
<td height="462" colspan="2">&nbsp;</td>
</tr>
</table>
<div align="center"></div></td>
</tr>
</table>
</body>
</html>

lux
02-23-2007, 11:21 AM
http://www.w3schools.com/html/

hehe

davidj
02-23-2007, 01:04 PM
but i just need to know a solution incase i run into this problem again.


the solution is to learn HTML

your code is full of errors

domedia
02-23-2007, 01:14 PM
shoredogg, why don't you put some content into the page. Especially into the TD where your background image is missing.. you might be surprised to see what happens..