我很努力讓我的代碼中的文本只填充我體元素的80%寬度。不知道我是否應該使用寬度元素或填充。現在也沒有爲我工作。如何在div塊中設置文本以具有特定的寬度?
HTML:
<body>
<div id="full">
<h3>
The Idea
</h3>
<p class="paragraph">
text
</p>
<h3>
A Very Profitable Investment
</h3>
<p class="paragraph">
text
</p>
<h3>
30 Years Experience
</h3>
<p class="paragraph">
text
</p>
</div>
</body>
CSS:
#full{
width: 80%;
margin: auto;
display: inline-block
}