[英]Indent 2nd line of a paragraph to line up with first line?
I am using Font Awesome to add icons to p:before selectors and I am wondering how I can indent only the 2nd line of the paragraph so that the text is aligned. 我正在使用Font Awesome在选择器之前将图标添加到p:,我想知道如何仅缩进该段的第二行,以使文本对齐。
Here is what my current output looks like: 这是我当前的输出结果:
And here is what I am trying to accomplish: 这是我要完成的工作:
Here is my code: 这是我的代码:
<div class="result>
<p class='fa location'>{{ address }}<br/>{{ citystate }}</p>
</div>
And here is my CSS: 这是我的CSS:
.result .location:before {
content: "\f041";
padding-right:6px;
color:#b3b3b3;
}
Is it possible to accomplish this as-is? 是否可以原样完成此操作? Or will I need to restructure my code to achieve this effect? 还是我需要重组我的代码以实现这种效果?
What you could add in some
您可以在
添加的内容 after the <br />
and make your code look like this: 在<br />
,并使您的代码如下所示:
<div class="result>
<p class='fa location'>{{ address }}<br/> {{ citystate }}</p>
</div>
add the
添加
in until it is moved over as far as you need it. 直到将其移到所需位置为止。
I hope that helped you out. 希望对您有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.