Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Background image going weird

  • This topic is empty.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #194457
    cerberus478
    Participant

    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.

    http://jsfiddle.net/cerberus478/d7b6s0qr/

    #194458
    Senff
    Participant

    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)

    #194460
    Paulie_D
    Moderator

    (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.

    #194462
    cerberus478
    Participant

    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

    #194465
    Paulie_D
    Moderator

    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

    and

    or only bits and pieces of the image would show.

    seems downright impossible.

    #194466
    Senff
    Participant

    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.

    #194599
    cerberus478
    Participant

    Hi,

    Here is a link where you can view how the image is going weird. I’ve only noticed that it does it in firefox.

    http://webkrunch.co.za/static-demo/index.html

    #194602
    Paulie_D
    Moderator

    Resizing is now happening in FF but the actual effect is quite different to that in Chrome.

    #194603
    cerberus478
    Participant

    But does it at least go all weird?

    #194604
    Paulie_D
    Moderator

    It did when I first checked but not the second time when I had intended to try it without JS.

    #194690
    cerberus478
    Participant

    So any clue as to how to fix it?

Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘CSS’ is closed to new topics and replies.