stylesheet "tab"?

Discussion in 'HTML' started by Keith Wiley, Nov 7, 2003.

  1. Keith Wiley

    Keith Wiley Guest

    I would like a layout in which there is a list of items, each of which is
    a heading for a sublist of items, such that all the sublists are "tabbed"
    to the same position, sort of like:

    Black Items: cat, car, marker
    Red Items: curtain, sofa
    Orange Items: carpet

    Presently, I have the whole thing inside a <P> with a "left" for the left
    edge of the entire list, so that the list is indented under a more global
    heading, but I can't figure out how to set a "left" for the individual
    lists. I tried setting "left" inside a <SPAN>:

    <P STYLE="left: 20px">
    Black Item: <SPAN STYLE="left: 40px">cat, car, marker</SPAN>
    </P>

    But that didn't work. I figured out that I could push the lists over by
    giving SPAN a left margin, but the margins don't line up on the different
    lines of text, they are all spaced according to the width of the Color
    word.

    How do I do this?

    Thanks.

    ________________________________________________________________________
    Keith Wiley
    http://www.unm.edu/~keithw http://www.mp3.com/KeithWiley

    "Yet mark his perfect self-contentment, and hence learn his lesson,
    that to be self-contented is to be vile and ignorant, and that to
    aspire is better than to be blindly and impotently happy."
    -- Edwin A. Abbott, Flatland
    ________________________________________________________________________
     
    Keith Wiley, Nov 7, 2003
    #1
    1. Advertising

  2. Keith Wiley

    Eric Bohlman Guest

    Keith Wiley <> wrote in
    news:p:

    > I would like a layout in which there is a list of items, each of which is
    > a heading for a sublist of items, such that all the sublists are "tabbed"
    > to the same position, sort of like:
    >
    > Black Items: cat, car, marker
    > Red Items: curtain, sofa
    > Orange Items: carpet
    >
    > Presently, I have the whole thing inside a <P> with a "left" for the left
    > edge of the entire list, so that the list is indented under a more global
    > heading, but I can't figure out how to set a "left" for the individual
    > lists. I tried setting "left" inside a <SPAN>:
    >
    > <P STYLE="left: 20px">
    > Black Item: <SPAN STYLE="left: 40px">cat, car, marker</SPAN>
    > </P>
    >
    > But that didn't work. I figured out that I could push the lists over by
    > giving SPAN a left margin, but the margins don't line up on the different
    > lines of text, they are all spaced according to the width of the Color
    > word.
    >
    > How do I do this?


    Use a table. Seriously. What you're describing *is*, semantically, a
    table, and thus it should be honestly marked up as such. Use styles, of
    course, to specify the appearance of the table.

    Offsets like "left" apply only to elements with a non-static "position"
    property; since the position property isn't inherited, neither your <P> nor
    your <SPAN> have it, and therefore the offsets won't do anything.
     
    Eric Bohlman, Nov 7, 2003
    #2
    1. Advertising

  3. Keith Wiley

    Sid Ismail Guest

    On Fri, 7 Nov 2003 14:14:00 -0700, Keith Wiley <> wrote:

    : I would like a layout in which there is a list of items, each of which is
    : a heading for a sublist of items, such that all the sublists are "tabbed"
    : to the same position, sort of like:
    :
    : Black Items: cat, car, marker
    : Red Items: curtain, sofa
    : Orange Items: carpet


    Tabular data - so use Tables, my man. 'Tis is what is was designed for.

    Sid
     
    Sid Ismail, Nov 7, 2003
    #3
  4. Keith Wiley

    Richard Guest

    Keith Wiley wrote:

    > I would like a layout in which there is a list of items, each of which
    > is
    > a heading for a sublist of items, such that all the sublists are
    > "tabbed"
    > to the same position, sort of like:


    > Black Items: cat, car, marker
    > Red Items: curtain, sofa
    > Orange Items: carpet


    You could use <div> as a pseudo tab formation.
    Layout divisions side by side and the content will naturally fall into place
    where you position the divisions.
    But table usage would be the simplest way.
     
    Richard, Nov 8, 2003
    #4
    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. Hermit Dave
    Replies:
    0
    Views:
    445
    Hermit Dave
    Jan 22, 2004
  2. =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=

    Stylesheet referanse i stylesheet

    =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=, Jul 3, 2004, in forum: XML
    Replies:
    3
    Views:
    586
    =?ISO-8859-1?Q?J=F8rn_Tommy_Kinder=E5s?=
    Jul 4, 2004
  3. Steven An
    Replies:
    1
    Views:
    508
    Martin Honnen
    Nov 23, 2004
  4. David Blickstein
    Replies:
    3
    Views:
    1,044
    David Blickstein
    Aug 2, 2005
  5. David Blickstein
    Replies:
    14
    Views:
    6,360
    Harrie
    Oct 16, 2005
Loading...

Share This Page