I have a problem. I have a list with link in all item of the list. And when I want to add a span inside anchor tag, i have a space and can't remove it..
<li class="elementMyAccount spaceTopBetweenElementMyAccount">
<a href=""
class="elementMyAccountText">
Text4
<div class="adressDescription" >(text4)</div>
</a>
</li>
I send you jsFiddle to show you css and html:
https://jsfiddle.net/5fwvsqnb/10
I had remove this space line with change on my css, but it worked only on google chrome ... but not Safari and IE ( don't try others )
I changed css by :
#my-account .elementMyAccountText{
font-size: 15px;
position: absolute;
margin-left : 5px;
line-height:60px;
width:240px;
display: flex;
align-items: center;
}
#my-account .adressDescription{
display:block;
position:absolute;
font-size: 11px;
text-decoration: none;
margin-left: 40px;
line-height:15px;
display: block;
}
But maybe it's not the solution because on IE I have a space between my span and my text above.
Thanks all if you will try to help me !
The issue is in your code,
elementMyAccountTextclass haveposition: absolute;.If you want to display
TEXTin left align with the center of the box then You can usedisplay: flexto theulandliandalign-items: center;to theli.If you want full box clickable then
Remove
heightfromelementMyAccountclass and add below code