Helpful Information
 
 
Category: HTML & CSS
CSS Problem

Hi there...again.

I have a slight problem. I have 1 paragraph, indented 2cm, with 3 lines. the 1st line is supposed to be bold, and indented. the other 2 lines are supposed to be regular text, and also indented. Unfortunately, this is not the case. the 1st line is bold and indented, but the other 2 lines are not indented.

Here is the CSS file:

p.cap { font-weight="bold"; text-indent: 2cm; font-size: 18px}
p.para1 { text-indent: 2cm; font-family: Arial; font-size: 10pt}

Here is the HTML code:

<p class="cap">Bold Text Goes Here
<div class="para1">Regular text, but should still be indented
<div class="para1">Regular text, but should still be indented</div>
</div>

</p>

It was working before, but not now.

Any suggestions would be GREATLY appreciated.

thanks!!

text-indent only indents the first line of the paragraph. to make the whole paragraph indented, use padding-left: 2cm or even padding: 2cm if you want it even on all sides (top, bottom, left, right)

Thank you very much. It worked!!

You're welcome. Glad to be of service.










privacy (GDPR)