html - Firefox absolute position bug -
i'm having problem absolute position in firefox. works different chrome, ie or opera.
i'm talking navigation here http://mapylasky.xdiv.cz/
in browsers expect firefox in 1 line. in firefox not in place.
.menu-item{ position: absolute; color: #000; } .menu-item .icon{ position: absolute; background-image: url('<?php echo get_template_directory_uri(); ?>/img/menu/menu-icons.png'); } .menu-item .desc{ position: absolute; font-size: 16px; } .container{ width: 1100px; margin: 0 auto; position: relative; } .menu-item .icon{ height: 56px; } .menu-item.prvni{ left: 11px; top: 21px; } .menu-item.prvni .icon{ width: 193px; height: 92px; background-position-x: 452px; } .menu-item.prvni .desc{ left: 0px; top: 0px; }
html
<div class="navigation-background"> <div class="container"> <a href="javascript: void(0)" onclick="scrolltoanchor('uvod');"> <div class="menu-item prvni active" id="home-menu"> <div class="icon"></div> </div> </a> </div> </div>
what doing wrong?
jsfiffle: https://jsfiddle.net/2cne0fnc/
firefox not support background-position-x
, support background-position
simply change background-position-x: 100px
background-position:100px 0
include both x , y position.
working example : https://jsfiddle.net/41xb9xfb/
Comments
Post a Comment