Articles Tutorials Work at Home Entrepreneurs, Webmasters, Small Business Owners
Articles Tutorials Work at Home Entrepreneurs, Webmasters, Small Business Owners
Articles & Tutorials for Work at Home Entrepreneurs
Webmasters and Small Business Owners
Get More >

Newest Articles 
Search Engine Marketing
Internet Marketing
Affiliate Marketing
Email Marketing
Viral Marketing
Webmaster Resources
Business Resources
Make More Money
CSS
Web Design
Graphic Design
Color Theory
Product Reviews
Time Management
Business Ethics
Promotional Strategies
Glossary of Terms
Direct Mail Marketing
Telemarketing
Product Sourcing



Link to Us!

CSS
Email this article  :  Printer friendly page

Novel Paragraph Spacing with CSS

Click Here to View Live ExampleYou have seen this technique used in printed novels and books countless times. The paragraphs are single spaced together instead of double-spaced apart. So how do you get this effect on your web pages? Glad you asked because in this article we explain how easy this effect is to accomplish with the magic of CSS.

I should caution you though that this effect can be difficult for some folks to read on a computer screen. So use it wisely and sparingly.

Because you do not want all of your website's page paragraphs to have this effect, create a custom CSS class like the one below. This code should be placed within your external style sheet. If you are not familiar with the different methods of CSS and how or when to use them, be sure to read our article, "External, Internal or Inline? Which Method is Best?"

.single { text-indent: 25px; margin-bottom: 0; margin-top: 0; }

You can edit the text-index property to however many pixels you want your paragraphs indented. The key properties that render the paragraphs single-spaced are the margin-bottom and margin-top properties which are set to zero.

Now assign the custom class "single" to paragraphs in your web pages that you want single spaced. The HTML source code would look like this:

<p class="single">Your paragraphs in this area.</p>

If you want to get even more creative, you can justify your page text so that is resembles the page text of a newspaper. Again, use this effect sparingly as there are major down sides to using this effect on your entire web site.

If you want your custom class "single" to be justified, add the text-align property to the custom class we previously created as shown below:

.single { text-indent: 25px; margin-bottom: 0; margin-top: 0; text-align: justify; }

Click Here to view live comparison examples of both effects and see first hand why you should use these effects with discretion.

Related Article:
Newspaper Column Effect: Justified Page Text

Copyright © 1994-2006 by BasicTips.com, a division of BasicTemplates.com, CSS HTML Web Site Templates with Exernal CSS and Removable Graphics. If you found our articles helpful, subscribe to our newsletter and get articles like this delivered to your inbox - FREE.

Order soon and get up to 5 FREE domains & more!
Host 6 Domains on 1 Account
5000MB and 400GB for $6.95 a month!

 

Page copy protected against web site content infringement by Copyscape
All articles are originally authored by BasicTemplates.com. Reprints in whole or in part are not permitted. See Copyright Notice

Copyright © 1994-2006 BasicTips.com, a division of BasicTemplates.com, Web Site Templates with External CSS
The Internet's #1 Choice for HTML CSS Web Templates via a Membership. Designed using External CSS and Removable, Swap-Out Graphics.
Basic Web Templates | Website Templates | HTML CSS Templates | Web Design Templates | Web Site Templates