How can I indent starting from the second line of a paragraph?
I've tried
p {
text-indent: 200px;
}
p:first-line {
text-indent: 0;
}
and
p {
margin-left: 200px;
}
p:first-line {
margin-left: 0;
}
and
(with position:relative;)
p {
left: 200px;
}
p:first-line {
left: 0;
}
Is it literally just the second line you want to indent, or is it from the second line (ie. a hanging indent)?
If it is the latter, something along the lines of this JSFiddle would be appropriate.
div {
padding-left: 1.5em;
text-indent:-1.5em;
}
span {
padding-left: 1.5em;
text-indent:-1.5em;
}
<div>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</div>
<span>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.</span>
This example shows how using the same CSS syntax in a DIV or SPAN produce different effects.