Line Indent

  • Thread starter Thread starter Wally S
  • Start date Start date
W

Wally S

Last night I posted a poem of eight stanzas, each stanza having four lines.
I made each stanza one paragraph and separated the lines with line breaks.
The problem came when I had to indent the second and fourth lines of each
stanza. I suppose the standard way would have been to use a transparent gif
for a spacer, but I did something else. I put an em dash before the line and
formatted it the same color as the page background. It does seem to be a
Mickey-Mouse way of doing it though.

What would have been the normal way? a spacer?

Wally S
 
CSS is your friend.

<head>
<title>Shakespeare</title>
<style type="text/css">
<!--
p.indent { margin-left:25px; }
-->
</style>
</head>
<body>
<p>Love's not time's fool, though rosy lips and cheeks oh, no, it is an ever
fixed mark or bends with the remover to remove. Admit impediments; love is
not love love alters not with his brief hours and weeks, let me not to the
marriage of true minds. But bears it out even to the edge of doom.</p>

<p class="indent">Oh, no, it is an ever fixed mark or bends with the remover
to remove. It is the star to every wand'ring bark, love alters not with his
brief hours and weeks, let me not to the marriage of true minds. Within his
bending sickle's compass come; but bears it out even to the edge of doom.
Admit impediments; love is not love love's not time's fool, though rosy lips
and cheeks that looks on tempests and is never shaken;.</p>

<p>Oh, no, it is an ever fixed mark or bends with the remover to remove. I
never writ, nor no man ever loved. Whose worth's unknown, although his
height be taken. It is the star to every wand'ring bark, let me not to the
marriage of true minds that looks on tempests and is never shaken;. Oh, no,
it is an ever fixed mark love alters not with his brief hours and weeks, or
bends with the remover to remove.

<p class="indent">Admit impediments; love is not love. That looks on
tempests and is never shaken; within his bending sickle's compass come;
love's not time's fool, though rosy lips and cheeks. Oh, no, it is an ever
fixed mark if this be error and upon me proved, whose worth's unknown,
although his height be taken. Love alters not with his brief hours and
weeks, within his bending sickle's compass come; it is the star to every
wand'ring bark.</p>
 
Thanks, Murray, but this will make each line a paragraph by itself. There
will be too much space between lines, and I will have to use two paragraph
marks to sepate the stanzas. I want the lines to be separated by line
breaks. The poem you quote is broken into long sections, so separating the
sections by a para would be appropriate. But it would not look so good with
short lines:

<p>'Twas the night before Christmas, and all through the house<br>
Not a creature was stirring, not even a mouse.<br>
The stockings were hung by the chimney with care<br>
In hopes that St. Nicholas soon would be there.</p>

I want to indent the second and fourth lines. What I did looks okay as long
as the viewer does not change the background color. Can he do that? The
background color is formatted with a style.

http://www.dipika.org/2004/10/31/21_the_king_of_sweet/index.html

Wally S
 
You could try a <span>

<html>
<head>
<style>
..indent{padding-left:30px;}
</style>
</head>
<body>
<p>'Twas the night before Christmas, and all through the house<br>
<span class="indent">Not a creature was stirring, not even a
mouse.</span><br>
The stockings were hung by the chimney with care<br>
<span class="indent">In hopes that St. Nicholas soon would be
there.</span></p>
</body></html>

Works in preview and preview in browser (IE6), not in design view.
 
Not likely to change bg color...although I'm half thinking that it may be possible in the browser to do it with an Accessiblitily Style Sheet - haven't tried it though.


| Thanks, Murray, but this will make each line a paragraph by itself. There
| will be too much space between lines, and I will have to use two paragraph
| marks to sepate the stanzas. I want the lines to be separated by line
| breaks. The poem you quote is broken into long sections, so separating the
| sections by a para would be appropriate. But it would not look so good with
| short lines:
|
| <p>'Twas the night before Christmas, and all through the house<br>
| Not a creature was stirring, not even a mouse.<br>
| The stockings were hung by the chimney with care<br>
| In hopes that St. Nicholas soon would be there.</p>
|
| I want to indent the second and fourth lines. What I did looks okay as long
| as the viewer does not change the background color. Can he do that? The
| background color is formatted with a style.
|
| http://www.dipika.org/2004/10/31/21_the_king_of_sweet/index.html
|
| Wally S
|
| | > CSS is your friend.
| >
| > <head>
| > <title>Shakespeare</title>
| > <style type="text/css">
| > <!--
| > p.indent { margin-left:25px; }
| > -->
| > </style>
| > </head>
| > <body>
| > <p>Love's not time's fool, though rosy lips and cheeks oh, no, it is an
| ever
| > fixed mark or bends with the remover to remove. Admit impediments; love is
| > not love love alters not with his brief hours and weeks, let me not to the
| > marriage of true minds. But bears it out even to the edge of doom.</p>
| >
| > <p class="indent">Oh, no, it is an ever fixed mark or bends with the
| remover
| > to remove. It is the star to every wand'ring bark, love alters not with
| his
| > brief hours and weeks, let me not to the marriage of true minds. Within
| his
| > bending sickle's compass come; but bears it out even to the edge of doom.
| > Admit impediments; love is not love love's not time's fool, though rosy
| lips
| > and cheeks that looks on tempests and is never shaken;.</p>
| >
| > <p>Oh, no, it is an ever fixed mark or bends with the remover to remove. I
| > never writ, nor no man ever loved. Whose worth's unknown, although his
| > height be taken. It is the star to every wand'ring bark, let me not to the
| > marriage of true minds that looks on tempests and is never shaken;. Oh,
| no,
| > it is an ever fixed mark love alters not with his brief hours and weeks,
| or
| > bends with the remover to remove.
| >
| > <p class="indent">Admit impediments; love is not love. That looks on
| > tempests and is never shaken; within his bending sickle's compass come;
| > love's not time's fool, though rosy lips and cheeks. Oh, no, it is an ever
| > fixed mark if this be error and upon me proved, whose worth's unknown,
| > although his height be taken. Love alters not with his brief hours and
| > weeks, within his bending sickle's compass come; it is the star to every
| > wand'ring bark.</p>
| >
| > --
| > Murray
| >
| > | > > Last night I posted a poem of eight stanzas, each stanza having four
| > > lines.
| > > I made each stanza one paragraph and separated the lines with line
| breaks.
| > > The problem came when I had to indent the second and fourth lines of
| each
| > > stanza. I suppose the standard way would have been to use a transparent
| > > gif
| > > for a spacer, but I did something else. I put an em dash before the line
| > > and
| > > formatted it the same color as the page background. It does seem to be a
| > > Mickey-Mouse way of doing it though.
| > >
| > > What would have been the normal way? a spacer?
| > >
| > > Wally S
| > >
| > >
| >
| >
|
|
 
Wally:

Use CSS to control the spacing between paragraphs, e.g.,

#poem p { margin: 2px 2px; padding:0; background-color=saffron; } /*adjust
color to suit!*/
p.indent { margin-left:25px; }

Then -

<div id="poem"><p>His songs and yellow cloth are sweet,</p>
<p class="indent>His eating and His sleeping sweet,</p>
<p>His beauty and His tilak sweet—</p>
<p class="indent>The King of Sweet is sweet complete.</p>
 
Thanks, guys. I'll give these a try.

Wally S

Wally S said:
Thanks, Murray, but this will make each line a paragraph by itself. There
will be too much space between lines, and I will have to use two paragraph
marks to sepate the stanzas. I want the lines to be separated by line
breaks. The poem you quote is broken into long sections, so separating the
sections by a para would be appropriate. But it would not look so good with
short lines:

<p>'Twas the night before Christmas, and all through the house<br>
Not a creature was stirring, not even a mouse.<br>
The stockings were hung by the chimney with care<br>
In hopes that St. Nicholas soon would be there.</p>

I want to indent the second and fourth lines. What I did looks okay as long
as the viewer does not change the background color. Can he do that? The
background color is formatted with a style.

http://www.dipika.org/2004/10/31/21_the_king_of_sweet/index.html

Wally S
 
Back
Top