...

View Full Version : Having issues w/ <div> BG img CSS



mindlessLemming
01-15-2004, 02:24 AM
Hey all,
I must be missing something really obvious here because I'm going insane trying to get IE to display the background image of an empty div.
Here's my CSS, it works fine in Moz1.6


#compass{
height:174px;
width:173px;
background:url(images/compass.gif)no-repeat;
float:left;
margin-left:-86px;
margin-top:-85px;
}

But whenever I add any other definitions such as position:relative;display:block; it no longer works in Moz either.
I took too big of a break over Chistmas/New Years, had a bit too much fun and have now forgotten a hell of a lot of basic stuff.

Please Help:D
Cheers,
Andrew

lavalamp
01-15-2004, 10:47 AM
Could it be because there is no space separating the URL and the no-repeat?

background:url(images/compass.gif)no-repeat;

Failing that it could just be that there is something over the top of it with a white background. You got a link to the page with this problem?

mindlessLemming
01-15-2004, 11:30 AM
Thanks for the reply,
The space was the problem :o :rolleyes:

I'm still having a problem with the fact that the <div> has a negative left/top margin and IE is cutting off the overflow.
overflow:visible/auto/etc. aren't fixing it either?

Any suggestions?

All the CSS/XHTML is posted in this thread (http://www.codingforums.com/showthread.php?s=&threadid=31581) .

**edit: It DID fix the problem



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum