<a> indentation produces whitespace

时间:2017-11-02 15:09:52

标签: html hyperlink icons whitespace

I'm trying to display two links. But when I use the correct indentation the second link renders whitespace in front of the icon. Why does this happen? And is there a way to prevent it without using hardly readable code?

Creates whitespace:

<a href="...">
    <i class="fa fa-pencil-square-o fa-lg"/>
</a>
<a href="...">
    <i class="fa fa-trash fa-lg"/>
</a>

Second link produces whitespace

不创建空格:

<a href="...">
    <i class="fa fa-pencil-square-o fa-lg"/>
</a>
<a href="..."><i class="fa fa-trash fa-lg"/></a>

Second link produces no whitespace here

0 个答案:

没有答案