Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Background Image does not display in IE 5.5

Status
Not open for further replies.

JohnBeals

Programmer
Feb 26, 2002
49
US
I added a background image to my site, and it is not appearing unless I resize the window. The site is set up to work with IE 5.0 and later, and this happens with IE 5.5.

I reference the .CSS file here...

<HEAD>
<LINK REL=&quot;stylesheet&quot; TYPE=&quot;text/css&quot; HREF=&quot;Welcome.CSS&quot;>
</HEAD>

Here's the code in Welcome.css:

BODY
{
BACKGROUND-IMAGE: url(images/Welcome.jpg);
background-repeat : no-repeat;
background-position : 0% 0%;
background-color : White;
BORDER-BOTTOM: #c2d3dc groove;
BORDER-LEFT: #c2d3dc groove;
BORDER-RIGHT: #c2d3dc groove;
BORDER-TOP: #c2d3dc groove;
FONT-FAMILY: Arial, HELVITICA, 'Trebuchet MS';
LIST-STYLE: url(images/DBullets.jpg);
MARGIN: 10px 0px;
}

One more item. I said I had to resize the window to get the graphic to appear. I can also get it to appear if I cover the browser with another window. If I cover the browser with a small window I get the appearance of a paintbrush, where the graphic appears underneath wherever I move the small window. It seems to be a problem with IE. I tried it with Netscape and had another user with Mozilla (Linux box) access the page and the graphic displays fine.

I also changed the line
BACKGROUND-IMAGE: url(images/Welcome.jpg);
to
BACKGROUND-IMAGE: url(
Code:
[URL unfurl="true"]http://myserver.com/mypage/images/Welcome.jpg[/URL]
);

and the graphic still does not show.

This seems very weird.
John
 
Not sure if there is an order to things in css like background color then image, seems logical to put the thing most visible last.

Also to get my bg image to show I use :

#layer1 {
position: absolute;
top: 0;
left: 0;
background-color:#999999;
border-width: 0;
border-color: #ffffff;
width: 102%;
height: 100%;
padding: 0;
background-image: url(&quot;images/background.gif&quot;);
background-attachment: fixed ;
background-position: top right;
background-repeat: no-repeat;
}

***************************************
Party on, dudes!
[cannon]
 
Hi John,

I tested it in IE5.5 and it works fine.

Are you sure you linked your stylesheet right? I mean, if you have your file where you link the stylesheet in a another map like pages/yourfile.htm you should write:

<LINK REL=&quot;stylesheet&quot; TYPE=&quot;text/css&quot; HREF=&quot;../Welcome.CSS&quot;>

Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
I am still having this problem. I just posted the message below in the IIS forum. To answer the above question, I moved the Images directory under the main directory. See the new path below;

I have a website running IIS. The pages use Cascading Style Sheets. Some users don't see the background on the web pages unless they refresh their screen by resizing the browser or opening another window over the browser. You can literally &quot;paint&quot; the background with a smaller window over the browser.

I am looking for the cause of this, and am wondering if anyone has seen this before, and if it's related to IIS or Cold Fusion or something else?

Here's the relevant code for the .css file.

BODY
{
BACKGROUND: #FFFFFF url( no-repeat fixed top Left;
BORDER-BOTTOM: #c2d3dc groove;
BORDER-LEFT: #c2d3dc groove;
BORDER-RIGHT: #c2d3dc groove;
BORDER-TOP: #c2d3dc groove;
FONT-FAMILY: Arial, HELVITICA, 'Trebuchet MS';
MARGIN: 10px 0px;
font: normal normal;
font-variant: normal;
word-spacing: normal;
}

I am using TopStyle Lite to create the .css files, and can see the background in TopStyle Lite.
The background is always visible to me, it's other users that are having problems.

I have also tried this URL
BACKGROUND: #FFFFFF url(../images/background.jpg) no-repeat fixed top Left;
without luck.

Thanks,
JB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top