Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Indentation

0 views
Skip to first unread message

Joe

unread,
Jul 30, 2001, 3:25:44 PM7/30/01
to
I have the following CSS script:
.indent
{
MARGIN-TOP: 0px;
MARGIN-BOTTOM: 0px;
MARGIN-LEFT: 15px;
}

I would like to know if there is a way to have the MARGIN-LEFT depend on the
parent. What I would like is to be able to have:
Some non-indented Text
<P CLASS="indent">Indented text
<P CLASS="indent">Indented twice
</P></P>
Or is there not a way to do that? Also, does netscape have problems with
nested <P> tags?
Thanks,

Joe Mumbauer.


Steve Fulton

unread,
Jul 30, 2001, 5:33:18 PM7/30/01
to
Every browser should have a problem with "nested" <P> tags! From the HTML 4
spec: "The P element represents a paragraph. It cannot contain block-level
elements (including P itself)."

But if you had an element that was class="indent" that could contain
block-level elements that were themselves class="indent", then your style
would indent the children twice.

--
There are two ways of spreading light: to be the candle or the mirror that
reflects it. -Edith Wharton

=-=-=
Steve
-=-=-

"Joe" <mumb...@kutztown.edu> wrote in message
news:#2Xae0SGBHA.1360@tkmsftngp05...

Joe

unread,
Jul 31, 2001, 9:02:15 AM7/31/01
to
Thanks, I tried using the DIV tag and it works great!

Joe Mumbauer.


Nathan Sokalski

unread,
Aug 1, 2001, 2:31:23 AM8/1/01
to
First, the <P> tag does not usually have a closing tag (it is optional).
Second, because the <P> tag is an inline object (in this case, text), it
cannot be nested. But if it was nestable, you would use a % instead of a
measurement (such as px). But it sounds like you want to use a list, which
can be nested. If you want what I think you want, try something like this:

<HTML>
<HEAD>
<STYLE>
UL{list-style-type:none; margin-top:0px; margin-bottom:0px;}
</STYLE>
</HEAD>
<BODY>
<UL STYLE="Margin:0px;">
<LI>Paragraph #1 Paragraph #1 Paragraph #1 Paragraph #1 Paragraph #1
Paragraph #1 Paragraph #1 Paragraph #1 Paragraph #1 Paragraph #1 Paragraph
#1
<UL>
<LI>Paragraph #2 Paragraph #2 Paragraph #2 Paragraph #2 Paragraph #2
Paragraph #2 Paragraph #2 Paragraph #2 Paragraph #2 Paragraph #2 Paragraph
#2
<UL>
<LI>Paragraph #3 Paragraph #3 Paragraph #3 Paragraph #3 Paragraph #3
Paragraph #3 Paragraph #3 Paragraph #3 Paragraph #3 Paragraph #3 Paragraph
#3
</UL>
</UL>
</UL>
</BODY>
</HTML>

This will give you a set of paragraphs where the first one is not indented,
and each following one is indented from the previous one.
--
Nathan Sokalski
njsok...@hotmail.com
soka...@kutztown.edu

"Joe" <mumb...@kutztown.edu> wrote in message
news:#2Xae0SGBHA.1360@tkmsftngp05...

0 new messages