Forum Moderators: open
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Example Title</title>
<link rel="SHORTCUT ICON" href="http://www.example.com/images/eim.ico" />
</head>
<body background="http://www.example.com/starsbackground.gif">
<div align="center"><font color="#33cc33" size="7"><strong>
Example text</strong></font></div>
<div align="center"><font color="#33cc33"><strong> </strong><font size="7"><strong></strong></font></font></div>
<div align="center"><font color="#33cc33"><font size="7"><strong>example text</strong></font></font><br />
</div><br />
</body>
</html>
I must be misssing something obvious.Thanks again
These are some common problems with background images that I've run into:
#1 - There's a typo somewhere
#2 - The image is not on the server, only the local computer
#3 - The path to the image is not what you think it is
#4 - The server MIME type is not set properly for the image type
I have the small stars image (gif type) installed on my server at the root of the domain.I have checked multiple times for typos.I have tried every conceivable path to the image and now I have defined image/gif as being associated with gif images in MIME.What else can I do?
I really don't understand how the background is showing up in my control panel html editor but not live.
Theres not a whole lot of code going on here gents,I am starting from the beginning and I need this background( or similar,have tried another small gif image too with same results).I suppose I may test this with a jpg image and see what happens.I'll be back.Could it possibly be because this image is animated ,albeit simply stars twinkling?
<html>
<head>
<style type="text/css">
body
{
background-image:url('starsbackground.gif');
}
</style>
</head>
<body>
<p>By default, a background image will be repeated both vertically and horizontally.</p>
</body>
</html>
To answer you jbinbpt "no that didn't solve the problem"
If you mean that the url jbinbpt suggested does not display the image in your browser - then the background image is NOT at that path, not at the domain root. Tre image file needs to be exactly where the inde home page html file is (index.html, default.aspx ro whatever your name is).
Maybe you are uploading the image to a folder that is above the actual domain root? It depends on how your hastomg service has configured your account - but there may be a choice of folders when you access by FTP, and one folder is called "www" or "http" or "web" or something like that. Your image file must be IN that folder, and not parallel - not at the same level in the hierarchy as that folder is.
Thgat's just a guess - because this is an error I've made in the past. If by chance you once accidentally uploaded a copy of the index page file in that parallel spot, it can confuse your into thinking you are now uploading to the right spot.
[edited by: tedster at 10:59 pm (utc) on July 22, 2009]
the image IS there when I load www.example.com/image.gif into my browser.It's blinking away up in the left corner just as it should be.It's about 120x120 pixels
so it is therefore being summoned at the correct location it would seem to me.It is on an addon domain and I have tried every path to the image including the main domain and even using public_html/maindomain/addon/image.gif and every variation
any other thoughts.It's gotta be something simple.
just tried it with a jpg non-blinking image---same non-result but the image is there in the browser when I type it in www.example.com/image.jpg
this is baffling me
and on your other point are you recommending that I remove the curly brackets:
{
background-image:url('starsbackground.gif');
}
and replace with the less than< greater than> brackets? with the ammended text?
off to try that
it is already before the </head> tag,is it not?
I did remove the path to the image and just left it as suggested at w3schools i.e as pasted here
<html>
<head>
<style type="text/css">
body
{
background-image:url('starsbackground.gif');
}
</style>
</head>
also tried your other suggestion with the <body background="starsbackground.gif"> and nothing changed.