...

View Full Version : Can't see background image



j1adobe
07-14-2008, 10:30 PM
And today was going so well...

Have a div that is supposed to show a background. I cannot see it in FF or Safari. I am using FF to test with Safari as a backup. FF has the web developer on it, so I can happily say the code is compliant. Sadly, it doesn't work.

The page is not up yet and is only on the company intranet so I can't provide a link. The following code is the stuff I pulled off the page and put into a test file to see if the image got stuck underneath something else, it didn't.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="stylesheets/test.css">

</head>

<body>

<div id="textarea">
text

</div> <!-- textarea-->

</body>

</html>


#textarea {
top:145px;
left: 144px;
width: 664px;
height: 405px;
position: absolute;
background-image: url('images/longshot');
background-color: gray;
}

jcdevelopment
07-14-2008, 10:34 PM
try this



#textarea {
top:145px;
left: 144px;
width: 664px;
height: 405px;
position: absolute;
background-image: url('../images/longshot');
background-color: gray;
}


if not, than you may not have uploaded the image for some reason

_Aerospace_Eng_
07-14-2008, 11:16 PM
Is anyone else noticing that there is not extension on the url to the image?

jcdevelopment
07-14-2008, 11:32 PM
Is anyone else noticing that there is not extension on the url to the image?

good catch, i missed that! :D

j1adobe
07-15-2008, 02:15 PM
Originally Posted by _Aerospace_Eng_:
Is anyone else noticing that there is not extension on the url to the image?


_Aerospace_Eng_, that mistake was made toward the end of the day. It wasn't there all along. It's easy to giggle and laugh at a newbie making dumb mistakes. You were in my shoes once. I don't think you were born with all the knowledge you have now. A comment like that only makes you appear arrogant.

I didn't run across this problem and immediately run to someone to give me the answer. I tried to figure it out my self first. I read and looked things up and tried to get it on my own. When I finally did post it there was a mistake in what I posted. So what?

I could point out a grammar mistake you made in your post, but I won't. I don't exist only to give you giggles. A little mutual respect would help here.


jc, thanks for the help. You pointed me in the right direction. I appreciate it.

abduraooft
07-15-2008, 02:46 PM
What _Aero said is you might have missed the file extension like .jpg/ .gif/ .png etc in images/longshot

j1adobe
07-15-2008, 03:24 PM
abduraooft,

I know, but that wasn't the problem. That mistake was made when I retyped the code to post it.

The problem was that I forgot to take into account the CSS was in a folder. I only checked the path between html and the image files. I didn't back out of the stylesheet folder.

Dumb I know, but what the heck, I'm a Graphic Designer by training. But I'm learning.

_Aerospace_Eng_
07-15-2008, 03:29 PM
abduraooft,

I know, but that wasn't the problem. That mistake was made when I retyped the code to post it.

The problem was that I forgot to take into account the CSS was in a folder. I only checked the path between html and the image files. I didn't back out of the stylesheet folder.

Dumb I know, but what the heck, I'm a Graphic Designer by training. But I'm learning.
We could have told you that if you had posted a link. :rolleyes:

How are we supposed to know that it was a typo on the image url?

j1adobe
07-16-2008, 04:51 PM
Aero;

Like I said, the site is not online, there is no link yet, it's not that far along.

It definitely was a mistake on my part to omit the extension. The real problem was I forgot to back out if the CSS folder, as jc pointed out.

After a long day of struggling with this thing, I took offense to the tone of your answer. People don't like to be talked down to, and they don't like people talking behind their backs, especially in front of their face.

I don't post every line looking for people here to write my code for me. By the time I do post you can be assured I tried to get the answer and need to ask someone with more experience.

So, let's be done with this and move on, OK?

rmedek
07-16-2008, 08:31 PM
j1adobe: Relax. No one is talking down to you or behind your back. You're making a very big deal out of a completely harmless comment, which leads to things like flame wars, which means the moderator has to get involved, and the moderator does not like getting involved. :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum