How can control table TH's width

Discussion in 'ASP General' started by Jack, Jan 26, 2004.

  1. Jack

    Jack Guest

    Hello,
    <TABLE BORDER=1 CELLSPACING=0>
    <TR>
    <TH>
    <style="WIDTH=10">
    ABC
    </TH>
    <TH>
    <style="WIDTH=500">
    DEF
    </TH>
    </TR>
    </TABLE>

    But ABC and DEF's width is same.I want control TH's width
    Thank you
     
    Jack, Jan 26, 2004
    #1
    1. Advertising

  2. Jack

    Steven Burn Guest

    <th width=60%>

    --
    Regards

    Steven Burn
    Ur I.T. Mate Group
    www.it-mate.co.uk

    Keeping it FREE!

    Disclaimer:
    I know I'm probably wrong, I just like taking part ;o)


    Jack <> wrote in message
    news:...
    > Hello,
    > <TABLE BORDER=1 CELLSPACING=0>
    > <TR>
    > <TH>
    > <style="WIDTH=10">
    > ABC
    > </TH>
    > <TH>
    > <style="WIDTH=500">
    > DEF
    > </TH>
    > </TR>
    > </TABLE>
    >
    > But ABC and DEF's width is same.I want control TH's width
    > Thank you
    >
     
    Steven Burn, Jan 26, 2004
    #2
    1. Advertising

  3. Jack

    Jack Guest

    It's myself
    How can specify TH's length by pixel or centimeter in that table?
    I wait anyone's help
     
    Jack, Jan 26, 2004
    #3
  4. Jack

    Evertjan. Guest

    Jack wrote on 26 jan 2004 in microsoft.public.inetserver.asp.general:
    > It's myself
    > How can specify TH's length by pixel or centimeter in that table?
    > I wait anyone's help


    Not an ASP (serverside) issue

    PLEASE go elsewhere to a HTML group



    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Jan 26, 2004
    #4
  5. Jack

    Chris Barber Guest

    Look at a HTML attribute reference guide for the relevant attributes
    allowable on specific tags.
    http://www.ashleybrown.co.uk/htmlref/tagref.asp?tag=th

    Best of all, get hold of O'Reilly "Dynamic HTML, The Definitive Reference"
    book.

    Chris.

    "Jack" <> wrote in message
    news:uUYA4$...
    It's myself
    How can specify TH's length by pixel or centimeter in that table?
    I wait anyone's help
     
    Chris Barber, Jan 26, 2004
    #5
  6. Jack

    CJM Guest

    Or how about looking into CSS properly..

    <th style="width:10px">
    ABC
    </th>

    or

    <th style="width:60%">

    etc...

    http://www.w3schools.com/css/

    Chris
     
    CJM, Jan 26, 2004
    #6
  7. Jack

    Chris Barber Guest

    True, however, a good understanding of basic HTML first would be useful,
    then moving to the application of CSS. In my opinion CSS is better applied
    as a stylesheet as opposed to explicit style attributes.

    eg. <TH class="width-small">Test</TH>

    and in the stylesheet:

    TABLE TR TH.width-small {width: 10px;}

    My point was that the basic level of understanding of where and what to look
    for when confronted with something like this seemed to be lacking, hence the
    post into the NG for what is generally very easy to find using Google and a
    good book references.

    Chris.

    "CJM" <> wrote in message
    news:%23sisac$...
    Or how about looking into CSS properly..

    <th style="width:10px">
    ABC
    </th>

    or

    <th style="width:60%">

    etc...

    http://www.w3schools.com/css/

    Chris
     
    Chris Barber, Jan 26, 2004
    #7
  8. Jack

    CJM Guest

    It's OK Chris... wasnt having a go at you... lol

    "Chris Barber" <> wrote in message
    news:%...
    > True, however, a good understanding of basic HTML first would be useful,
    > then moving to the application of CSS.


    Yep, agreed.


    >In my opinion CSS is better applied
    > as a stylesheet as opposed to explicit style attributes.
    >
    > eg. <TH class="width-small">Test</TH>
    >
    > and in the stylesheet:
    >
    > TABLE TR TH.width-small {width: 10px;}
    >


    Yeah, much like my thoughts too.

    I just didnt want to go into the nth level of detail, when really we were
    only
    trying to edge the OP to some guides/references, but I always use external
    CSS files.

    Spoiler: I think the 'width-small' class name should be changed to something
    describes the semantics rather than the styling. That is, next week the OP
    might
    change the styling to green text rather than a narrow column. Even something
    simple like 'FirstCol' would do. Yes, I know I'm being pedantic... lol

    > My point was that the basic level of understanding of where and what to

    look
    > for when confronted with something like this seemed to be lacking, hence

    the
    > post into the NG for what is generally very easy to find using Google and

    a
    > good book references.


    Very true... there is plenty of bad advice out there, but I guess if you
    stick to the
    higher-ranked google and NG recommendations you cant go wrong.

    Cheers

    Chris

    PS. It's probably worth pointing out that if you can get to them, there are
    two
    non-MS NG's for these kind of enquiries:

    comp.infosystems.www.authoring.html
    comp.infosystems.www.authoring.stylesheets

    [Warning: not quite as mellow as this NG!]
     
    CJM, Jan 26, 2004
    #8
    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. AndrewF
    Replies:
    1
    Views:
    822
    Bruce Barker
    Oct 10, 2005
  2. Sean Jorden
    Replies:
    1
    Views:
    618
    laurie
    Aug 19, 2003
  3. kris
    Replies:
    11
    Views:
    896
  4. David Basford
    Replies:
    3
    Views:
    2,505
    BootNic
    Sep 30, 2007
  5. Replies:
    1
    Views:
    751
    Beauregard T. Shagnasty
    Dec 29, 2007
Loading...

Share This Page