Mr Portman

School website critiques, articles on education and some random cod

Indenting text but not the first line

Tags:

Date: 11th May, 2010

The text-indent parameter for CSS only applies to the first line. By giving it a negative value and then padding the whole text, you’ll get the result you want. Here’s the CSS:

#dateContent ul li {text-indent: -20px; padding-left: 20px;}

  1. May 11, 2010 | Mr Portman

    This doesn’t appear to work in Google Chrome for some reason.

    An alternative method would be to replace the padding with a margin, but I haven’t tried that.

September 2010

August 2010

July 2010

June 2010

May 2010

April 2010

February 2010

January 2010

December 2009

November 2009

October 2009

September 2009