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.
精彩评论