I have the following css:
.flag
{
background-image: url('http://192.168.1.88/david/images/flag_set/flag_set/europa_flag_set.jpg');
width: calc(4 * 5.93px);
height: calc(4 * 3.99px);
background-size: calc(4 * 35.08px) calc(4 * 49.63px);
cursor:pointer;
}
.flag.portugal
{
float: left;
background-position: calc(4 * -14.62px) calc(4 * -30.42px);
}
.flag.reinoUnido
{
float: right;
background-position: calc(4 * -21.40px) calc(4 * -40.22px);
}
And the corresponding html:
<div class="flag contentor">
<div class="flag portugal" onclick="$('.lang').removeClass('mostra');$('.lang.portugal').addClass('mostra');"></div>
<div class="flag reinoUnido" onclick="$('.lang').removeClass('mostra');$('.lang.reinoUnido').addClass('mostra');"></div>
</div>
In my laptop it works fine, but in my android tablet it only shows two white squares.
Am I doing something wrong positioning the background? is it some incompatibility with the tablet's browser?
the image I'm using is:
And what I need to show in the divs are the Portugal flag and the United Kingdom flag like this:
Is there any polyfill/shim I could use to correct this?