开发者

How to force html/css padding/margin on an element?

How can I add/force bottom margin/padding to the following <a> element ?

<p>
    <h31>Testing?</h31>
    <a style="margin-bottom: 200px">Create a new Entry</a>        
    testing padding
/*more stuff here...*/

Styles are very convoluted and the margin-bot开发者_StackOverflowtom: 200px is not forcing the padding after the <a> element.


The margin CSS property doesn't work as expected when the elements are inline. Add display:block, or display:inline-block (in your case) to enable margins on inline elements (such as anchors).

The padding property is usually applied without trouble.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜