Indenting secon row

Discussion in 'HTML' started by Bob, Feb 26, 2007.

  1. Bob

    Bob Guest

    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
     
    Bob, Feb 26, 2007
    #1
    1. Advertising

  2. Bob

    Amos E Wolfe Guest

    "Bob" <> wrote in message
    news:...
    >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 (&nbsp;)
    > 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
    }




    --
    -=# Amos E Wolfe #=-
    AIM: Traindriver9334
    Get Firefox: http://www.spreadfirefox.com/?q=user/register&r=122394
     
    Amos E Wolfe, Feb 26, 2007
    #2
    1. Advertising

  3. Bob

    Andrew Guest

    On Mon, 26 Feb 2007 01:48:57 -0800, Bob wrote:

    > 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.


    snip>>>>>>>>>>.

    Hi Bob,

    I think you are describing a definition list:

    http://www.maxdesign.com.au/presentation/definition/

    All the very best,

    Andrew
    --
    A: Because it disturbs the logical flow of the message.
    Q: Why is top posting frowned upon?
     
    Andrew, Feb 26, 2007
    #3
  4. Scripsit Andrew:

    >> Apples
    >> These are the finest apples from Washington State.

    - -
    > 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>".

    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Feb 26, 2007
    #4
  5. 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; }


    --
    Jukka K. Korpela ("Yucca")
    http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Feb 26, 2007
    #5
  6. Bob

    Andy Dingley Guest

    On 26 Feb, 09:48, "Bob" <> wrote:
    > 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>
     
    Andy Dingley, Feb 26, 2007
    #6
  7. Bob

    Bob Guest

    On Feb 26, 4:52 pm, "Andy Dingley" <> wrote:
    > On 26 Feb, 09:48, "Bob" <> wrote:
    >
    > > 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>


    All my descriptions, both short and long are in tables....
     
    Bob, Feb 27, 2007
    #7
  8. Bob wrote:
    > On Feb 26, 4:52 pm, "Andy Dingley" <> wrote:
    >> On 26 Feb, 09:48, "Bob" <> wrote:
    >>
    >>> 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>

    >
    > 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>



    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Feb 27, 2007
    #8
  9. Bob

    Andy Dingley Guest

    On 27 Feb, 10:57, "Bob" <> wrote:

    > 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>
     
    Andy Dingley, Feb 27, 2007
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Darrel
    Replies:
    2
    Views:
    1,772
    Darrel
    Oct 31, 2004
  2. RAB
    Replies:
    2
    Views:
    392
    Chris R. Timmons
    Nov 6, 2005
  3. Yama

    Indenting INPUT

    Yama, Nov 12, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    399
    Daniel Fisher\(lennybacon\)
    Nov 14, 2005
  4. John

    Indenting with XHTML

    John, Sep 9, 2004, in forum: HTML
    Replies:
    29
    Views:
    1,216
  5. D
    Replies:
    0
    Views:
    239
Loading...

Share This Page