CSetting text margin in CSS?

  • Thread starter Thread starter Bruce Stemplewski
  • Start date Start date
B

Bruce Stemplewski

I already have my margin for my page set in my CSS file.

I also have the following style which I can apply to a paragraph.
Body {text-decoration: none; color: #000000; font: 16px Arial, Helvetica}

How can I set the right and left margin for the same paragraph? Do I need
to put a blockquoute around it? If so how do I set the margins for the
blockquote in the CSS file?
 
First off,
Body {text-decoration: none; color: #000000; font: 16px Arial, Helvetica}
is a type selector. Because of its name, it applies to everything within
<body> and </body> tags. It doesn't apply to individual paragraphs.

To set the left and right margins of a specific paragraph, code a class
selector such as:

..msg {margin-left: 20px; margin-right:30px; }

and then add class="msg" to the <p> tag for the paragraph in question.

Jim Buyens
Microsoft FrontPage MVP
(e-mail address removed)
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
Back
Top