styel as rules="all"

Discussion in 'HTML' started by tshad, Feb 3, 2005.

  1. tshad

    tshad Guest

    Is there a style that equates to rules="all"?

    Tom
    tshad, Feb 3, 2005
    #1
    1. Advertising

  2. tshad

    rf Guest

    "tshad" <> wrote

    > Is there a style that equates to rules="all"?


    * ?
    rf, Feb 3, 2005
    #2
    1. Advertising

  3. tshad

    rf Guest

    "rf" <rf@.invalid> wrote in message
    news:uCxMd.146702$...
    > "tshad" <> wrote
    >
    > > Is there a style that equates to rules="all"?

    >
    > * ?


    Hmmm. Having read your *other* posts on this matter I now understand what
    you are talking about.

    If you had said "Is there a CSS proterty that equates to the rules=all
    attribute/value of the <td> element" it may have been clearer.

    No not really. Have a look at
    http://www.w3.org/TR/REC-CSS2/tables.html#borders

    This is the bit that talks about borders in CSS "tables". In any case there
    is a good chance that IE will not suport what you want.

    What is wrong with using the rules attribute anyway. Doesn't it do what you
    want?
    rf, Feb 3, 2005
    #3
  4. "rf" <rf@.invalid> wrote:

    > Hmmm. Having read your *other* posts on this matter I now understand
    > what you are talking about.


    What other posts on this matter?

    > If you had said "Is there a CSS proterty that equates to the rules=all
    > attribute/value of the <td> element" it may have been clearer.


    Well, it would have been odd, since there is no such attribute for <td>.
    For <table>, and only for <table>, there is.

    > This is the bit that talks about borders in CSS "tables".


    What rules="all" really means is that it specifies that all _cells_ have
    borders. In that sense, it is sufficient to set a border for all th and td
    elements. The details depend on what you really want. There is no way in
    general to simulate the effect of rules="all" as such, since the borders
    you get by using HTML alone are of some unspecified default kind. In CSS,
    you can and must be more specific, such as
    th, td { border: solid 1px #555; }

    > In any case
    > there is a good chance that IE will not suport what you want.


    In this case, things might work even on IE.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Feb 3, 2005
    #4
  5. tshad

    Richard Guest

    On Thu, 03 Feb 2005 17:49:04 GMT tshad wrote:

    > Is there a style that equates to rules="all"?


    > Tom



    No.
    Richard, Feb 4, 2005
    #5
  6. tshad

    Toby Inkster Guest

    tshad wrote:

    > Is there a style that equates to rules="all"?


    I think you probably want something like:

    table {
    border: 2px silver outset;
    empty-cells: show;
    }
    th, td {
    border: 2px silver inset;
    }


    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Feb 4, 2005
    #6
  7. tshad

    tshad Guest

    "rf" <rf@.invalid> wrote in message
    news:vOxMd.146709$...
    >
    > "rf" <rf@.invalid> wrote in message
    > news:uCxMd.146702$...
    >> "tshad" <> wrote
    >>
    >> > Is there a style that equates to rules="all"?

    >>
    >> * ?

    >
    > Hmmm. Having read your *other* posts on this matter I now understand what
    > you are talking about.
    >
    > If you had said "Is there a CSS proterty that equates to the rules=all
    > attribute/value of the <td> element" it may have been clearer.
    >
    > No not really. Have a look at
    > http://www.w3.org/TR/REC-CSS2/tables.html#borders
    >
    > This is the bit that talks about borders in CSS "tables". In any case
    > there
    > is a good chance that IE will not suport what you want.
    >
    > What is wrong with using the rules attribute anyway. Doesn't it do what
    > you
    > want?


    Nothing wrong with using it. I just have to remember to put in the proper
    tables.

    I was trying to use CSS as much as possible. I have been getting quite a
    bit of grief from people who say I should drop the table tags and us CSS
    styles. I have to find the right mix of both.

    Some say I should do my pages without tables at all. Pretty interesting
    statement, considering that the much of the .net objects are based on
    tables.

    I was just confused on why the rules attribute did what it did based on what
    I read. I had read that article and was not sure what the collapse business
    was all about.

    Tom
    tshad, Feb 4, 2005
    #7
  8. tshad

    tshad Guest

    "Jukka K. Korpela" <> wrote in message
    news:Xns95F3F5BBCA84jkorpelacstutfi@193.229.0.31...
    > "rf" <rf@.invalid> wrote:
    >
    >> Hmmm. Having read your *other* posts on this matter I now understand
    >> what you are talking about.

    >
    > What other posts on this matter?
    >
    >> If you had said "Is there a CSS proterty that equates to the rules=all
    >> attribute/value of the <td> element" it may have been clearer.

    >
    > Well, it would have been odd, since there is no such attribute for <td>.
    > For <table>, and only for <table>, there is.
    >
    >> This is the bit that talks about borders in CSS "tables".

    >
    > What rules="all" really means is that it specifies that all _cells_ have
    > borders. In that sense, it is sufficient to set a border for all th and td
    > elements. The details depend on what you really want. There is no way in
    > general to simulate the effect of rules="all" as such, since the borders
    > you get by using HTML alone are of some unspecified default kind. In CSS,
    > you can and must be more specific, such as
    > th, td { border: solid 1px #555; }
    >


    But this is what is confusing. If I say borders=1 and no rules, I get 3D
    borders. If I say borders=1 and rules=all, I get borders all around, but
    they are thin lines. If I say borders=0 and rules=all, I get the same thin
    lines, but not on the outside of the table. Looks like tic tac toe. If the
    rules were to border the cells, why isn't there a border on the outside of
    the outside cells?

    Tom
    >> In any case
    >> there is a good chance that IE will not suport what you want.

    >
    > In this case, things might work even on IE.
    >
    > --
    > Yucca, http://www.cs.tut.fi/~jkorpela/
    > Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    >
    >
    tshad, Feb 4, 2005
    #8
  9. "tshad" <> wrote:

    > But this is what is confusing.


    The <table> attributes mostly _are_ confusing. This is one reason why it is
    often best to play with CSS only when styling a table, except perhaps for
    border="1", since it is generally rather important, for a data table, to
    have some borders around cells in non-CSS situations.

    > If I say borders=1 and no rules, I get
    > 3D borders.


    You mean border, not borders.

    By HTML definition, border="1" implies a default of rules="all", i.e. there
    are borders around each cell, in addition to the border around the table as
    a whole. The cell borders have a browser-dependent default appearance,
    which you might be able to affect in CSS, but not in (standard) HTML.
    Their typical appearance might be characterized as three-dimensional,
    though this is somewhat debatable since they are normally 1px thin.
    The border around the entire table has the width defined by the border
    attribute's value.

    > If I say borders=1 and rules=all, I get borders all
    > around, but they are thin lines.


    I'm pretty sure you have misanalyzed something. Why don't you specify a
    demo URL and list the browsers you used for testing this?

    > If I say borders=0 and rules=all, I
    > get the same thin lines, but not on the outside of the table.


    On which browser(s)? IE is known to get such things wrong. There should be
    no border around the table as a whole if you set border="0", but IE
    misbehaves.

    > If the rules were to border the cells, why isn't
    > there a border on the outside of the outside cells?


    Pardon? Are you referring to a _different_ IE misbehavior: if you
    additionally set frame="void", IE correctly leaves out the border around
    the table as a whole but it also incorrectly leaves out some of the borders
    of the cell?

    Did I mention that this is easier in CSS? Just set border="1" in HTML, and
    then start playing with CSS.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Feb 5, 2005
    #9
  10. tshad

    tshad Guest

    "Jukka K. Korpela" <> wrote in message
    news:Xns95F4B4656BB12jkorpelacstutfi@193.229.0.31...
    > "tshad" <> wrote:
    >
    >> But this is what is confusing.

    >
    > The <table> attributes mostly _are_ confusing. This is one reason why it
    > is
    > often best to play with CSS only when styling a table, except perhaps for
    > border="1", since it is generally rather important, for a data table, to
    > have some borders around cells in non-CSS situations.
    >

    Not sure what you mean here. What would be considered a non-CSS situation?

    I get all kinds of grief when not using CSS, but clearly you still need to
    use table attributes for some instances (right?).

    >> If I say borders=1 and no rules, I get
    >> 3D borders.

    >
    > You mean border, not borders.
    >
    > By HTML definition, border="1" implies a default of rules="all", i.e.
    > there
    > are borders around each cell, in addition to the border around the table
    > as
    > a whole. The cell borders have a browser-dependent default appearance,
    > which you might be able to affect in CSS, but not in (standard) HTML.
    > Their typical appearance might be characterized as three-dimensional,
    > though this is somewhat debatable since they are normally 1px thin.
    > The border around the entire table has the width defined by the border
    > attribute's value.


    I did put a sample page:

    http://www.payrollworkshop.com/samples/tablerulestest.htm

    to show the differences.

    And I did figure out how to get just the outside border (border=1,
    rules="none").

    In IE, it actually does what you would expect (most of the time). I assume
    border=1 implies rules=all (as you said) and border=0 implies rules=none.
    Same with Mozilla. But in IE, you can't seem to get rules=all without the
    outside border. It implies border=0 and rule=none.

    In IE, all the lines (borders look the same - stylized 3D look). In
    Mozilla, only borders=1 has this look. All the rest are thin lines.

    >
    >> If I say borders=1 and rules=all, I get borders all
    >> around, but they are thin lines.

    >
    > I'm pretty sure you have misanalyzed something. Why don't you specify a
    > demo URL and list the browsers you used for testing this?
    >


    I did and it is at:

    http://www.payrollworkshop.com/samples/tablerulestest.htm

    >> If I say borders=0 and rules=all, I
    >> get the same thin lines, but not on the outside of the table.

    >
    > On which browser(s)? IE is known to get such things wrong. There should be
    > no border around the table as a whole if you set border="0", but IE
    > misbehaves.


    Which is irritating.
    >
    >> If the rules were to border the cells, why isn't
    >> there a border on the outside of the outside cells?

    >
    > Pardon? Are you referring to a _different_ IE misbehavior: if you
    > additionally set frame="void", IE correctly leaves out the border around
    > the table as a whole but it also incorrectly leaves out some of the
    > borders
    > of the cell?
    >
    > Did I mention that this is easier in CSS? Just set border="1" in HTML, and
    > then start playing with CSS.
    >


    I will need to do this more to get a better idea of the behaviors in each of
    the browsers.

    Thanks,

    Tom
    tshad, Feb 10, 2005
    #10
  11. "tshad" <> wrote:

    > Not sure what you mean here. What would be considered a non-CSS
    > situation?


    Generally, any situation where style sheets are not applied or, what comes
    close to that in practice, where a browser's or user's style sheet
    overrides most of the author's style sheet. For example, if anyone still
    surfs around with Netscape 4, it's probably best to switch off its
    style sheet "support".

    > I get all kinds of grief when not using CSS, but clearly you still need
    > to use table attributes for some instances (right?).


    Well, "need" is a strong word, but I really meant that border="1" is quite
    useful for most data tables.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Feb 10, 2005
    #11
    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. thaneesh

    Code formatting rules in editor

    thaneesh, Jul 2, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,157
    thaneesh
    Jul 2, 2003
  2. Bernt Fischer
    Replies:
    2
    Views:
    2,187
    Guogang
    Aug 28, 2003
  3. Gabriel Schumann

    table rules="all"

    Gabriel Schumann, Sep 2, 2004, in forum: HTML
    Replies:
    5
    Views:
    6,136
    Gabriel Schumann
    Sep 2, 2004
  4. tshad

    Rules=all

    tshad, Feb 2, 2005, in forum: HTML
    Replies:
    0
    Views:
    481
    tshad
    Feb 2, 2005
  5. puzzlecracker
    Replies:
    4
    Views:
    312
    Ron AF Greve
    Feb 7, 2009
Loading...

Share This Page