1 reply [Last post]
Jeffrey Bridgman
Offline
newbie
Last seen: 12 years 9 weeks ago
Timezone: GMT-6
Joined: 2003-05-09
Posts: 6
Points: 0

hello, this may be a simple Q but I appreciate you help.

What if you have for example a poem, each line is separated by <br> however if the line is longer that the width of the box which it is in, then you want it to indent so as to differentiate it from other lines, how could this be done?

JeffBE

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 6 days 10 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

making secondline indent on test wrap

Hi Jeffrey,
you could try setting using the pseudo-class "first-line".
If you want all but the first line indented try using a negative margin.

p{margin-left:10px;}
p:first-line{margin-left:-5px;}

Hope that helps.