I am having an element
html
- <a class="icon-right"></a>
css
- *{
- border-sizing:border-box;
- }
- a.icon-right{
- display:inline-block;
- height:90%;
- vertical-align:middle;
- }
jquery
- var $iconH = $('.icon-right').height();
- $('.icon-right').width( $iconH );
- // test to see -->
- $('.test').text($iconH);
I get
- <span class="test">90</span>
If I look into Chrome webdev tools I get the final values -->
.icon-right w=92px h=66px
with test.text I get 90 and the width = 66 !
what can be wrong in my code ?
thanks for helping