css - background size cover IE11 not covering full area -


i'm going bonkers. ie11 refuses fill entire area of div background image, though i've set background-size property cover. consider following example:

css:

.bg {     width: 100%;     min-height: 220px;     background: url("bg.jpg") center top no-repeat;     background-attachment: fixed;     background-size: cover; } 

html:

<div class="bg">bla</div> <div class="bg">blabla<br />blabla</div> 

chrome, firefox, safari, opera expect happen: background image, bg.jpg, covering full visible area of divs, no matter proportions of browser window are.

ie11 on other hand not, instead there visible gaps (in case) on left , right hand side of divs. when disable "background-attachment: fixed" rule, works , background image covers whole area. fixed, not. sadface.

it problem specific website i'm working on, know ie11 has no problem this, cannot see cause this. it's making brain hurt. i'd love post link said website, can't. if need further examples or have questions, please don't hesitate ask.

any help/suggestions highly appreciated. thanks!

update: actually, seems background-size: cover ignored totally ie11 when background-attachment set fixed. sigh.

update 2: screenshots (hopefully) illustrate problem somewhat. in ie background appears fixed, not covering area should.

ff , ie side side same image guides

i've managed fix issue applying following css. i'm not 100% happy it, it'll have do.

if runs same issue, test fix, may work depending on scenario, maybe won't.

.bg {     ...     background-size: 100% 100%; } 

holy crab-shoe on stick ... well, kinda embarrassing.

the problem was: ie zoomed out.

the solution: zoom in.

the css working fine along.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -