段落“< p>”填充未应用 [英] paragraph "<p>" padding not applied

查看:94
本文介绍了段落“< p>”填充未应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下三段代码的行为完全相同:

 < p {padding:0 15 0 15}> ;这里有一段文字...< / p> 

< p>这里有一段文字...< / p>

< p style =padding:0 15 0 15>这里有一段文字...< / p>

如何获得两边缩进的段落? (我尝试15px而不是15(EDIT - 但只有前两个),我也尝试用逗号分隔数字,就像我在Google上发现的一个例子。)





定义了div:

 < div style =background-color:white; color:black; overflow:auto>感谢您的帮助。

解决方案

15? 15什么?您是否考虑过使用单位

 < p style =padding:0 15px> foo 



The following three pieces of code behave exactly the same:

<p {padding: 0 15 0 15}>  A paragraph of text here...  </p>

<p> A paragraph of text here... </p>

<p style="padding: 0 15 0 15">  A paragraph of text here...  </p>

How do I get the paragraph indented on both sides? (I tried 15px instead of 15 (EDIT - but only on the first two), I also tried separating the numbers with commas, like an example I found on Google.)

The above code is in a div which is in the body, no other divs or tables, etc. are involved.

The div is defined:

<div style="background-color: white; color: black; overflow:auto">

Thanks for any help.

解决方案

15? 15 what? Have you considered using units?

<p style="padding: 0 15px">foo</p>

这篇关于段落“&lt; p&gt;”填充未应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆