Style for table

Discussion in 'HTML' started by Tora, Sep 8, 2003.

  1. Tora

    Tora Guest

    I have one html-file & one css-file.
    All works fine with the styles except for the element TABLE

    When i write in the html-file

    TABLE border="1" frame="box"

    all works fine, but when i do the following in the html-file

    TABLE class="mystyle"

    and then in the css

    TABLE.mystyle
    { border: 1;
    frame: box;
    }

    The table stays without border and no frame


    How come ?
     
    Tora, Sep 8, 2003
    #1
    1. Advertising

  2. Tora wrote:

    > TABLE.mystyle
    > { border: 1;
    > frame: box;
    > }


    Perhaps:

    table.mystyle {
    border: 1px dotted blue;
    }

    or

    table.mystyle {
    border: 1px solid red;
    }

    or even

    table.mystyle, table.mystyle td, table.mystyle th {
    border: 1px solid #ccc;
    }


    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
     
    Toby A Inkster, Sep 8, 2003
    #2
    1. Advertising

  3. Tora

    Allen Guest

    Re[2]: Style for table

    Hello Toby,

    Monday, September 8, 2003, 3:08:55 AM, you wrote:

    TAI> Tora wrote:

    >> TABLE.mystyle
    >> { border: 1;
    >> frame: box;
    >> }


    TAI> Perhaps:

    TAI> table.mystyle {
    TAI> border: 1px dotted blue;
    TAI> }

    To elaborate,
    when specifying a border in css, you MUST specify more than just the
    size attribute; you need to also specify a style { such as dotted,
    dashed, solid } and, preferably, a color. Toby gave you some good
    examples of how this can be done.

    Allen
     
    Allen, Sep 8, 2003
    #3
  4. Re: Re[2]: Style for table

    Allen wrote:

    > when specifying a border in css, you MUST specify more than just the
    > size attribute; you need to also specify a style { such as dotted,
    > dashed, solid } and, preferably, a color.


    Hmmm... it is possible to just specify a border width. The important thing
    is to qualify your number (1) with a unit (em, px, ex, %, etc).

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
     
    Toby A Inkster, Sep 8, 2003
    #4
  5. Tora

    Crepe Guest

    Re[4]: Style for table

    Toby,

    Monday, September 8, 2003, 2:07:07 PM, you wrote:

    TAI> Allen wrote:

    >> when specifying a border in css, you MUST specify more than just the
    >> size attribute; you need to also specify a style { such as dotted,
    >> dashed, solid } and, preferably, a color.


    TAI> Hmmm... it is possible to just specify a border width. The important thing
    TAI> is to qualify your number (1) with a unit (em, px, ex, %, etc).

    Indeed, it is -possible-, but poor practice. My wording was
    over-the-top, I'll admit. But if you want your page rendering to be
    concise/consistent from browser to browser, platform to platform, it
    is wise to specify specifics. While the css specifications DO outline
    what SHOULD be used by default if no user-defined attributes are
    specified, these are not always followed. IE is the biggest proponent
    of bad-standards-compliance.

    Be well.

    --
    In order to reach me via email, the subject MUST be:
    lettuce tea
     
    Crepe, Sep 8, 2003
    #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. David Williams
    Replies:
    2
    Views:
    1,145
    Jacob Yang [MSFT]
    Aug 12, 2003
  2. Rob Nicholson
    Replies:
    3
    Views:
    771
    Rob Nicholson
    May 28, 2005
  3. Rio
    Replies:
    4
    Views:
    1,217
  4. Rahul
    Replies:
    5
    Views:
    658
    Rahul
    Jul 23, 2009
  5. Ken Varn
    Replies:
    0
    Views:
    492
    Ken Varn
    Apr 26, 2004
Loading...

Share This Page