Question on (X)HTML/CSS table structures

Discussion in 'HTML' started by Jeremy Brown, May 18, 2006.

  1. Jeremy Brown

    Jeremy Brown Guest

    Hi,
    I have several tables on my site that have the same layout throughout the
    site, regardless of page. I am inherently lazy and do not want to type a
    class="xxxx" in every row <tr> and data <td> entry of a table. I am
    wondering if there is a way to put a single class in the <table> that will
    configure the whole table, <td> & <tr> included if possible.

    Thanks,
    Jeremy

    Example of what I am talking about:
    http://jerem43.home.att.net/home for an example of the type of table I am
    talking about, specifically the "Jumpstation"

    http://jerem43.home.att.net/css for my style sheet

    --
    Visit my Saab & me at:
    http://jerem43.home.att.net
    Jeremy Brown, May 18, 2006
    #1
    1. Advertising

  2. Jeremy Brown

    Toby Inkster Guest

    Jeremy Brown wrote:

    > I am inherently lazy and do not want to type a class="xxxx" in every
    > row <tr> and data <td> entry of a table.


    TABLE.foo { color:blue; border:1px solid green; }
    TABLE.foo TD { color:blue; border:1px solid red; }

    <table class="foo">
    <tr><td>a</td><td>b</td></tr>
    <tr><td>1</td><td>2</td></tr>
    </table>

    Go read up on descendant selectors.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, May 18, 2006
    #2
    1. Advertising

  3. Jeremy Brown

    Jeremy Brown Guest

    Thank you sir,
    this helps alot.

    Jeremy

    --
    Visit my Saab & me at:
    http://jerem43.home.att.net


    "Toby Inkster" <> wrote in message
    news:5n.co.uk...
    > Jeremy Brown wrote:
    >
    >> I am inherently lazy and do not want to type a class="xxxx" in every
    >> row <tr> and data <td> entry of a table.

    >
    > TABLE.foo { color:blue; border:1px solid green; }
    > TABLE.foo TD { color:blue; border:1px solid red; }
    >
    > <table class="foo">
    > <tr><td>a</td><td>b</td></tr>
    > <tr><td>1</td><td>2</td></tr>
    > </table>
    >
    > Go read up on descendant selectors.
    >
    > --
    > Toby A Inkster BSc (Hons) ARCS
    > Contact Me ~ http://tobyinkster.co.uk/contact
    >
    Jeremy Brown, May 18, 2006
    #3
  4. On Thu, 18 May 2006 07:12:16 GMT, "Jeremy Brown" <>
    wrote:

    >Hi,
    >I have several tables on my site that have the same layout throughout the
    >site, regardless of page. I am inherently lazy and do not want to type a
    >class="xxxx" in every row <tr> and data <td> entry of a table. I am
    >wondering if there is a way to put a single class in the <table> that will
    >configure the whole table, <td> & <tr> included if possible.
    >
    >Thanks,
    >Jeremy
    >
    >Example of what I am talking about:
    >http://jerem43.home.att.net/home for an example of the type of table I am
    >talking about, specifically the "Jumpstation"
    >
    >http://jerem43.home.att.net/css for my style sheet


    Hi Jeremy,

    There are some bizarre examples on the CSS Table Gallery but also a
    few very nice ones:

    http://icant.co.uk/csstablegallery/

    I modified one myself (Like Adwords):

    http://www.pnc.com.au/~plstrong/strongs/appendices_2.html

    Hope this helps,

    Andrew.
    sorry.no.email@post_NG.com, May 19, 2006
    #4
  5. Jeremy Brown

    jb Guest

    sorry.no.email@post_NG.com wrote:
    > On Thu, 18 May 2006 07:12:16 GMT, "Jeremy Brown" <>
    > wrote:
    >
    >> Hi,
    >> I have several tables on my site that have the same layout throughout the
    >> site, regardless of page. I am inherently lazy and do not want to type a
    >> class="xxxx" in every row <tr> and data <td> entry of a table. I am
    >> wondering if there is a way to put a single class in the <table> that will
    >> configure the whole table, <td> & <tr> included if possible.
    >>
    >> Thanks,
    >> Jeremy
    >>
    >> Example of what I am talking about:
    >> http://jerem43.home.att.net/home for an example of the type of table I am
    >> talking about, specifically the "Jumpstation"
    >>
    >> http://jerem43.home.att.net/css for my style sheet

    >
    > Hi Jeremy,
    >
    > There are some bizarre examples on the CSS Table Gallery but also a
    > few very nice ones:
    >
    > http://icant.co.uk/csstablegallery/
    >
    > I modified one myself (Like Adwords):
    >
    > http://www.pnc.com.au/~plstrong/strongs/appendices_2.html
    >
    > Hope this helps,
    >
    > Andrew.


    That's certainly an interesting site.

    Thanks.
    jb, May 19, 2006
    #5
    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. Eric
    Replies:
    4
    Views:
    708
    clintonG
    Dec 24, 2004
  2. Titus A Ducksass - AKA broken-record
    Replies:
    6
    Views:
    649
    Titus A Ducksass - AKA broken-record
    Nov 15, 2004
  3. tweak
    Replies:
    14
    Views:
    2,776
    Eric Sosman
    Jun 11, 2004
  4. vitay
    Replies:
    8
    Views:
    538
    Stan McCann
    Nov 9, 2006
  5. Alfonso Morra
    Replies:
    11
    Views:
    709
    Emmanuel Delahaye
    Sep 24, 2005
Loading...

Share This Page