vendredi 28 novembre 2014

WIDTH SPAN LI IE CHROME


Vote count:

0




I have a problem on IE10,Chrome, if I set a width on containing li span. Taking the width of the span, I attribute to the li. IE missing 1px for the text yours ... This problem arises in certain size font-size ex: 18px .. And I can not find where the problem comes...



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://ift.tt/kkyg93">
<html xmlns="http://ift.tt/lH0Osb">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>HEY</title>

<script type="text/javascript" src="jquery-1.7.1.js"></script>

<style type="text/css">
html {font-family:Arial, Helvetica, sans-serif; }

#hp_barreSeek{ background:#f0f0f0; height:37px; width:100%; }
#hp_barreSeekData{ height:37px; width:940px; margin:0 auto 0 auto; }

#hp_barreSeekData ul,#hp_barreSeekData ul li,#hp_barreSeekData ul li span{
height:37px; line-height:37px; vertical-align:middle;
display:block;}
#hp_barreSeekData ul{ padding:0 18px 0 18px; }
#hp_barreSeekData ul li{ float:left; list-style:none;}
#hp_barreSeekData ul li+li{ margin-left:45px;}
#hp_barreSeekData ul li span{ font-size:18px; }
#hp_barreSeekData ul li+li>span{cursor:pointer!important;}
#hp_barreSeekData ul li+li>span:hover,#hp_barreSeekData ul li span.selected{ color:#cacaca;}

</style>
</head>

<body>

<div id="hp_barreSeek">
<div id="hp_barreSeekData">
<div id="tabs">
<ul>
<li class="title" ><span>Title</span></li>
<li id="toto" ><span id="onefx">btn1 hey</span></li>
<li ><span>btn2</span></li>
<li ><span>btn3</span></li>
<li ><span>btn4</span></li>
<li class="clear"></li>
</ul>

</div>
<div class="clear"></div>
<script type="text/javascript">
$('#onefx').on('click',function(){
$('#toto').css('width',$(this).width());
console.log($(this).width());
});
</script>
</div>
</div>
</body>
</html>


asked 22 secs ago







WIDTH SPAN LI IE CHROME

Aucun commentaire:

Enregistrer un commentaire