开发者

Indent an entire paragraph?

I have a code setup for a FAQ page like this:

<p><strong>This Is A Question</strong></p>
<p><strong>Answer.</strong> This is the content of the answer, and I am going to keep 
typing until it kicks to a new line.</p>

I do notice that when this displays via the browser the n开发者_运维技巧ew line does not align up to the start of the Answer Content. Align as in from the left. I am also aware not to expect HTML to do such a thing, must question is. What are my options on coming across "indenting" this text per se?

Any help would be greatly appreciated!


Inspired by Nicole Sullivan's css .media element, you can check out a two column solution update to your jsfiddle.


I think this is what you want:

<p><strong>This Is A Question</strong></p>
<p><strong style="float:left">Answer.</strong> 
<div style="display:inline-table;float:right">This is the content of the answer, and I am going to keep typing until it kicks to a new line.</div></p>

Edit: Scratch that, it works in FF + IE, but not in chrome


Try negative padding in CSS for the div of your paragraph. Usually work across webkit and gecko.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜