views:

96

answers:

5

Screenshot of the issue: http://cl.ly/2oS3

Webpage in Question: http://cure.org

Offending browser: Internet Explorer 7

You'll notice from the screenshot, or if you view this site in IE7, that the background image is not displaying for the content div (#modal-inner-content). Strangely, the image displays in the other divs where it is used (since it's a sprite, I'm using that same image for #modal-top-border and #modal-btm-border).

In all other browsers it displays properly, and even in IE8. I cannot seem to find what CSS rule (or lack thereof) I may be using that IE7 is choking on.

NOTE: in order to get the modal screen, just click the link at the very top banner of the page that says "login to your CURE account

A: 

Not sure why the image isn't showing up in IE7, but this could be a good intermediate fix. this should add a white background if the image doesn't show up.

Try changing #modal-inner-content from:

background: url(http://cure.org/img/modal-bg-xy.png?jcb=1284407379) repeat-y -636px 0%;

to:

background: url(http://cure.org/img/modal-bg-xy.png?jcb=1284407379) #fff repeat-y -636px 0%;

--- Edit - don't use above answer ---

Try wrapping the url in quotes:

background: url("http://cure.org/img/modal-bg-xy.png?jcb=1284407379") repeat-y -636px 0%;
hookedonwinter
The trouble then though it doesn't use transparency properly even when the image shows up, since the sprite makes use of shaded sides and transparent borders.
JAG2007
Ah. Well then. Don't try that. ;)
hookedonwinter
Plus that doesn't line up right with the top and bottom borders of the modal box.
JAG2007
Thanks anyway. :-O
JAG2007
Does ie7 do well with the lack of quotes? try wrapping the url in quotes.
hookedonwinter
@hookedonwinter none of my urls referenced have quotes though, so that would not make any sense - including the same exact image called in the #modal-top-border and #modal-btm border. (not saying it's out of IE's framework to "not make sense" - just sayin')
JAG2007
A: 

I need to install ie7. My first try would be to add a width to #modal-inner-content

FutureKode
You can see the same behavior by using compatibility mode in IE8
Chris Lively
Well the width shouldn't matter because there are elements inside with defined widths. Right?
JAG2007
when it comes to IE adding a width can fix haslayout issues
FutureKode
+1  A: 

I just remembered that IE7 has a problem with mixed units in the background position property. so -636px top should be -636px 0

FutureKode
I'll have to test it - but the odd thing is that there is no problem with this on my local files, but only on the production. And I'm 99.99% certain there are no differences between the markup and css for this locally vs. production.
JAG2007
+1  A: 

Are you using some fix for IE and png images ?

If i remember correctly, most plugins/methods to enable transparency to background images by using the filter css property of IE made the background non-repeatable ..

It could be it ..

Gaby
Good question...I'll have to check on that.
JAG2007
@JAG, try changing the rule to use a *`.gif`/`.jpg`* file and see if that changes things..
Gaby
+1  A: 

I agree with FutureKode. The background on #modal-inner-content isn't displaying because IE doesn't think the element hasLayout, which sometimes causes problems with other style declarations. To trigger hasLayout, the easiest way I see would be to style that div with width:576px (what Firebug is telling me the width of that div is). I'm assuming the width of that box never changes?

More on hasLayout, and what triggers it: http://www.satzansatz.de/cssd/onhavinglayout.html

Jason S.
Not totally sure this was the issue, but that would make sense. When I was initially trouble shooting this issue, I noticed our development code was not giving the issue, and the production was. But I couldn't see the discrepancy between the versions at a glance. But we just pushed an update and the issue is resolved. At a second glance I do see a width defined, so maybe it wasn't there before. Thx.
JAG2007
No prob! After my answer, I remembered that you had mentioned that it was working fine for you locally, which made me wonder what was up -- but not very long, because I just assume IE7's a jerk. :) (To note, I was using the IE Development Toolbar to check CSS properties (like you can in Firebug) and the width of #modal-inner-content hadn't been explicitly defined before.)
Jason S.