- This topic is empty.
January 28, 2015 at 7:24 am #194457
On my localhost I have a page that has a background image and every now and then when I refresh it goes all weird. The background image would either kind of disappear or only bits and pieces of the image would show.
Here is the link to the code on JSFiddle, but I’m not sure if JSFiddle will replicate my problem.January 28, 2015 at 7:40 am #194458SenffParticipant
Here is the link to the code on JSFiddle, but I’m not sure if JSFiddle will replicate my problem.
Looks fine to me, it seems to do what it’s (probably) supposed to do.
Please make sure that you can replicate and show us the actual problem, or else it’s very difficult for us to investigate what the issue may be.
(I assume that the missing closing bracket of the IMG tag is just a typo)January 28, 2015 at 7:48 am #194460
(I assume that the missing closing bracket of the IMG tag is just a typo)
Even when you fix that the function doesn’t appear to work..if it’s supposed to maintain aspect ratio.January 28, 2015 at 7:51 am #194462
It is suppose to maintain the ratio. I might have done it wrong in JSFiddle, but my biggest problem is the background image going weirdJanuary 28, 2015 at 8:05 am #194465
Unfortunately, if you can’t replicate the issue it’s tough to help since
The background image would either kind of disappear
is kind of unspecific
or only bits and pieces of the image would show.
seems downright impossible.January 28, 2015 at 8:11 am #194466SenffParticipant
It is suppose to maintain the ratio. I might have done it wrong in JSFiddle, but my biggest problem is the background image going weird
It doesn’t maintain the ratio when the block width is less than the block’s height (ie. portrait sized). Other than that, “going weird” is kind of open-ended and can mean anything.January 29, 2015 at 7:24 am #194599
Here is a link where you can view how the image is going weird. I’ve only noticed that it does it in firefox.January 29, 2015 at 7:52 am #194602
Resizing is now happening in FF but the actual effect is quite different to that in Chrome.January 29, 2015 at 8:00 am #194603
But does it at least go all weird?January 29, 2015 at 8:03 am #194604
It did when I first checked but not the second time when I had intended to try it without JS.January 30, 2015 at 5:17 am #194690
So any clue as to how to fix it?
- The forum ‘CSS’ is closed to new topics and replies.