开发者

Removing the edge margin of an element "li"

I am with this HTML and it all elements li.gradient-top seem to have an edge right

I've checked on several debugger tools but do not know why he's putting the margin between an li elem开发者_运维技巧ent and another li.

How to remove this margin?


That is not margin but a space character. Since these are inline elements, whitespace is displayed between them if it exists in the markup. Remove the whitespace from the html. Eg:

    <li>...</li>
    <li>...</li>

Becomes:

    <li>...</li><li>...</li>

If you don't want to change the markup, you can try applying float: left to the <li> elements.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜