Indenting secon row

B

Bob

I have a number of items that I'm listing row by row...these items
always have a short description but some of them have a long
description as well....something like this

Apples
These are the finest apples from Washington State.

As you can see.....the long description is indented about 4 ( )
non breaking spaces.

All is well UNLESS my long description goes onto the next row...then
it looks like this

Apples
These are the finest apples from Wshington State and were picked by
virgins wearing gloves made of virgin wool.

As you can see..the second row of the long description does not
indent...and looks lousy...

I know I can use a small width TD and leave it blank....that would be
one work around.....

....does anyone have a good solution to this problem?

Thanks-In-Advance,

Bob Sweeney
 
A

Amos E Wolfe

Bob said:
I have a number of items that I'm listing row by row...these items
always have a short description but some of them have a long
description as well....something like this

Apples
These are the finest apples from Washington State.

As you can see.....the long description is indented about 4 ( )
non breaking spaces.

All is well UNLESS my long description goes onto the next row...then
it looks like this

Apples
These are the finest apples from Wshington State and were picked by
virgins wearing gloves made of virgin wool.

As you can see..the second row of the long description does not
indent...and looks lousy...

I know I can use a small width TD and leave it blank....that would be
one work around.....

...does anyone have a good solution to this problem?


You could use a nested unordered list like this:

<ul>
<li>Apples
<ul>
<li>These are the finest apples from Washington State and were picked
by virgins wearing gloves made of virgin wool.
</ul>
</ul>

and stick this in your css

ul
{
list-style-type: none
}
 
J

Jukka K. Korpela

Scripsit Andrew:
- -
I think you are describing a definition list:

No, he is writing about apples, _implying_ that the reader already knows
what the word "apple" means. A _definition_ for "apples" would be "fruit
from an apple tree, <i>Malus sp.</i>".
 
J

Jukka K. Korpela

Scripsit Bob:
I have a number of items that I'm listing row by row...

Posting a URL would have helped us to help you. What you have might be best
described as a list, or some other way.

By the way, childish use of "..." is disturbing. Even if you're 8 years old,
it's still best to write here as if you were an adult.
Apples
These are the finest apples from Washington State.

That doesn't make much sense, does it? As I wrote, a real URL would be
helpful.

Anyway, I guess that what you really have might be best marked-up using
heading and paragraph markup:

<h2>Apples</h2>
<p>These are the finest apples from Washington State.</p>

The desired appearance might then be achieved e.g. as follows (assuming you
don't want the headings highlighted):

h2 { font-size: 100%; font-weight: normal; margin: 1em 0 0 0; }

p { margin: 0 0 0.6em 2em; }
 
A

Andy Dingley

I have a number of items that I'm listing row by row...

So think about using one of the HTML list elements: <ul>, <ol>, <dl>
or <menu>

<menu> is deprecated, so forget that.

<ol> implies some sense of "ordering", whcih I don't think you need
here.

<ul> works, for a simple list of atomic elements. Nearly every HTML
list ought to be a <ul>.

<dl> is interesting though, because it has two distinct valid
children, <dt> and <dd> and there's already some vague implicit
coupling between <dt>(s) and the following <dd>(s). There's also
indication in the HTML spec that the notion of "definition list" is
very vague and can be ignored.

So I'd use <dl> and I'd have markup like this:

<dl>
<dt>Apples</dt>
<dd>These are the finest apples from Washington State and were picked
by virgins wearing gloves made of virgin wool.</dd>

<dt>Oranges</dt>
<dd>Gathered by those funny orange-skinned chaps who do the TV
antiques programs.</dd>
</dl>
 
B

Bob

So think about using one of the HTML list elements: <ul>, <ol>, <dl>
or <menu>

<menu> is deprecated, so forget that.

<ol> implies some sense of "ordering", whcih I don't think you need
here.

<ul> works, for a simple list of atomic elements. Nearly every HTML
list ought to be a <ul>.

<dl> is interesting though, because it has two distinct valid
children, <dt> and <dd> and there's already some vague implicit
coupling between <dt>(s) and the following <dd>(s). There's also
indication in the HTML spec that the notion of "definition list" is
very vague and can be ignored.

So I'd use <dl> and I'd have markup like this:

<dl>
<dt>Apples</dt>
<dd>These are the finest apples from Washington State and were picked
by virgins wearing gloves made of virgin wool.</dd>

<dt>Oranges</dt>
<dd>Gathered by those funny orange-skinned chaps who do the TV
antiques programs.</dd>
</dl>

All my descriptions, both short and long are in tables....
 
J

Jonathan N. Little

Bob said:
All my descriptions, both short and long are in tables....

Easy *don't* put them in tables. They shouldn't be....

Jukka's solution is the correct one...

STYLE:
h2 { font-size: 100%; font-weight: normal; margin: 1em 0 0 0; }
p { margin: 0 0 0.6em 2em; }

HTML:
<h2>Apples</h2>
<p>These are the finest apples from Washington State.</p>
 
A

Andy Dingley

All my descriptions, both short and long are in tables....

And is this working out well for you?


If you _insist_ on putting the content into a <table>, then try this:

<style type="text/css" >
tr.description td { padding-left: 4em; }
</style>

[...]

<table>
<tr class="title" ><td>Apples</td></tr>
<tr class="description" ><td>Blah blah blah</td></tr>
<tr class="title" ><td>Oranges</td></tr>
<tr class="description" ><td>Oompa loompa</td></tr>
</table>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top