3

I've been trying to center my text with my Fontastic.me icons.

Here's my code:

HTML:

<html>
 <div id="info">
    <ul>
        <li id="chat"><span class="icon-comment-discussion"></span><p>We offer the best & simplest chat system on the web.</p></li>
</ul>
</div>
</html>

and my CSS:

#chat {
line-height: 72px;
vertical-align: middle;
}

It doesn't line up at all, and nothing changes when I change the vertical-align option. I'm thinking maybe it's because my text is in a paragraph tag; but I wanted to ask here first.


Solved: I added the vertical-align: middle; to:

#chat span {

}

it worked perfectly.

4

1 回答 1

0

作为标准的段落将应用边距,您可以尝试删除边距以查看是否有帮助,或者将图标放在段落内。

p{ margin:0; }
于 2014-07-12T23:39:26.537 回答