August 21, 2010

Give paragraph effect through Css

Question by Starx

Can you tell me how to give paragraph effect to my paragraph using css?

for example:

               This is my paragraph. This is my paragraph. This is my paragraph. 
This is my paragraph. This is my paragraph. This is my paragraph. This is my paragraph. 
This is my paragraph. This is my paragraph. This is my paragraph. This is my paragraph. 
This is my paragraph. This is my paragraph. This is my paragraph. This is my paragraph.
This is my paragraph. This is my paragraph. This is my paragraph. This is my paragraph. This is my paragraph. This is my paragraph. This is my paragraph. This is my paragraph. 
This is my paragraph. This is my paragraph. This is my paragraph. This is my paragraph.
This is my paragraph. This is my paragraph. This is my paragraph. 

See the padding in the first line. I wantthat

Answer by Yi Jiang

You can try the text-indent property.

p { text-indent: 1em; }

See http://reference.sitepoint.com/css/text-indent

Answer by Starx

Try this

p:first-line { padding-left:10em; }

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!