Web Hosting Talk







View Full Version : Simple HTML Problem but I am stumped


DataDork
12-25-2007, 02:10 AM
For the life of me I cannot get the background image to show up even thoughmy business logo does. Can someone offer some assistance.

Here is the current code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DataDork</title>
<style type="text/css">
body { background: url(/images/background.gif); }
body, html { height: 98%; }
#center { vertical-align: center; }
#container { width: 700px; margin: auto; height: 100%; }
</style>
<meta http-equiv="keywords" content="datadork" />
<meta http-equiv="description" content="" />
<meta http-equiv="author" content="James Edmonds" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="shortcut icon" href="/favicon.ico" />
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" id="container">
<tr>
<td id="center"><img src="/images/datadork.gif" alt="DataDork" width="700" height="228" /></td>
</tr>
</table>
</body>
</html>

rezag
12-25-2007, 02:38 AM
Try with 'background-image'

DataDork
12-25-2007, 02:43 AM
Try with 'background-image'

No, that did not seem to fix it. It should work as I have it but it does not.

Thanks for the suggestion, though.

MYIGIS
12-25-2007, 03:20 AM
Your Background Image appears to be missing!
http://www.datadork.com/images/background.jpg

vito
12-25-2007, 03:34 AM
I'm sure MYIGIS means background.gif is missing from your /images folder. Not only that, datadork.gif is missing. Are you sure you uploaded the images folder to your root directory?

Vito

DataDork
12-25-2007, 03:52 AM
sorry guys. i deleted it and re-uploaded it. please take a second and take a look as i am totally frustrated.

background.gif and datadork.gif all with the flder specified.

any help is super appreciated....

vito
12-25-2007, 04:01 AM
http://www.datadork.com/images/background.gif

What is that image supposed to look like? It doesn't display at all in a browser.

Vito

vito
12-25-2007, 04:08 AM
As well, I just noticed your code is incorrect.

{ background: url(/images/background.gif); }

should read

{ background-image: url(/images/background.gif); }

Vito

rezag
12-25-2007, 04:09 AM
Its a 1x4px image, it works here now as far as I can see, I can post a screenshot if if you want. Yes the valid code is 'background-image'

MYIGIS
12-25-2007, 04:09 AM
Sorry, Yes I meant GIF.

I now see a background very fine light blue lines?

DataDork
12-25-2007, 04:10 AM
http://www.datadork.com/images/background.gif

What is that image supposed to look like? It doesn't display at all in a browser.

Vito

Vito,

It used to be white with light gray stripes. i just recovered from a hard drive crash and pulled it from my backups. that is probably my problem but also my worst fear.

thanks for checking again Vito. I have always had big respect for you.

vito
12-25-2007, 04:12 AM
Cool. Looks like you're good to go. :banana:

But if you want "proper" code, be sure to change "background" to "background-image".

Vito

DataDork
12-25-2007, 04:16 AM
Cool. Looks like you're good to go. :banana:

But if you want "proper" code, be sure to change "background" to "background-image".

Vito


made the change to background-image but the light gray pinstripe background image does not show. it that correct on your site also?

DataDork
12-25-2007, 04:18 AM
any idea on where to find a subtle white and gray pinstrip type image? my backups seems screwed.

vito
12-25-2007, 04:19 AM
Hmm. Just going based on http://www.w3schools.com/css/css_background.asp . Look at the second link.

Vito

vito
12-25-2007, 04:21 AM
BTW, I see you have background-image in the source code, and I can definitely see the pinstripe bg images on the page.

(I am using Firefox)

Vito

DataDork
12-25-2007, 04:23 AM
my business logo is there but the background.gif is still mia. i cant see it in eith firefox or ie 7

thanks for your help, Vito.

vito
12-25-2007, 04:35 AM
Can you see a bg at http://www.demodemo.com/bg.html ?

Vito

DataDork
12-25-2007, 04:38 AM
Can you see a bg at http://www.demodemo.com/bg.html ?

Vito


no, it looks the same as my site.

vito
12-25-2007, 04:43 AM
Well, I don't know what to tell ya, James. :(

I see a bg image in both Firefox and IE. Definite pinstripe bg. How is it you are not seeing it in yours? :confused:

If you manage to figure out why, feel free to use the bg image I created for you - www.demodemo.com/images/background.gif .

Vito

Lpal-Jay
12-25-2007, 08:13 AM
As well, I just noticed your code is incorrect.

{ background: url(/images/background.gif); }

should read

{ background-image: url(/images/background.gif); }

Vito
This isn't necessary. I don't use it, especially if I have other pieces of information like repeat-x.

WebDesignGold
12-25-2007, 01:46 PM
Try clearing your browser cache.

killapix
12-25-2007, 08:04 PM
Hmm. Just going based on http://www.w3schools.com/css/css_background.asp (http://www.w3schools.com/css/css_background.asp) . Look at the second link.

background: url("something.gif");
and
background-image: url("something.gif");

would achieve the same result the first is just the shorthand version of applying css, normally used to apply several rules to one element on just one line.
BTW I can't see your bg image on my screen either, if its faint and subtle maybe its due to the way your screen is set up, I know mine is quite bright and sometimes very faint lines or colours do not show.?

try putting the image url in quotes like : background: url("images/background.gif");

DataDork
12-26-2007, 04:12 AM
OK, I give up but thanks for all of the suggestions.

Here is the code now...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>DataDork</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">body { background: url(images/background.gif); }
body, html { height: 98%; }
#center { vertical-align: center; }
#container { width: 700px; margin: auto; height: 100%; }</style>
<meta http-equiv="keywords" content="datadork">
<meta http-equiv="description">
<meta http-equiv="author" content="James Edmonds">
<meta http-equiv="imagetoolbar" content="no">
<link href="/favicon.ico" rel="shortcut icon">
</head>
<body>
<table id="container" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td id="center"><img height="228" alt="DataDork" src="/images/datadork.gif" width="700"></td></tr></tbody></table>
</body>
</html>

where do i make the change to put in a solid color, say light gray, instead of this stupid background image and still make the html syntax valid.

thanks again for all of the advice but i cant seem to make it visable on any browser or pc.

update: i can see the background iomage but it is way to faint. count someone who can see it, make me another version that is a few shades darker. i would consider it a huge favor.

Lpal-Jay
12-26-2007, 07:30 AM
For the solid colour, change

background: url(images/background.gif);
to
background: #EFEFEF;

And change the colour to whatever you want to use.

vito
12-26-2007, 01:35 PM
update: i can see the background iomage but it is way to faint. count someone who can see it, make me another version that is a few shades darker. i would consider it a huge favor.
I'm not sure how much darker you want to go, James. Here is one using #CCCCCC. Let me know if you want one darker or lighter and I'll create it for you. :)

www.demodemo.com/misc/background.gif

Vito

DataDork
12-26-2007, 03:31 PM
Vito,

Thank you so much for both your time and effort. I have done business with you in the past and you always came across as a true professional.

This time was a personal favor and again, you came through for me.

The darker pinstripe you whipped up for me is finally visable on all of my pcs. And personally I think it looks great!

Consider me a friend.

James

vito
12-26-2007, 03:33 PM
:agree: :banana: :banana:

Vito