Link to home
Start Free TrialLog in
Avatar of Bl248
Bl248

asked on

How to indent multiple lines

Is there a way via CSS to indent the table cell contents for multple lines. Using text-indent, padding-left, margin-left only indent the first line and as it wraps, it begins the new line at the extreme left - no padding.
Avatar of nltech
nltech

<p style="margin-left:20px;">This text will indent 20px, even wrapped lines. Try it, you'll like it.</p>

margins & padding will apply to every wrapped line in a <p> (they apply to the paragraph as a whole), but not in a <span>

to apply to an entire table cell and everything inside of it, you can use <td style="padding-left:20px;">
Avatar of Bl248

ASKER

Thanks but I was looking for just a css style that could do this. I felt that I would need to change the HTML as well - and have a fix in place now. It would have been cleaner if I could have just used a CSS style as the template is used multiple times and I only wanted to change the CSS dynamically.
ASKER CERTIFIED SOLUTION
Avatar of nltech
nltech

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bl248

ASKER

Thanks for confirming :)